bp_buffer_multi_polygon - ObjectVision/GeoDMS GitHub Wiki
Geometric functions > bp_buffer_multi_polygon
- bp_buffer_multi_polygon(polygon_data_item, buffer_distance, nrPointsInCircle)
bp_buffer_multi_polygon(polygon_data_item, buffer_distance, nrPointsInCircle) creates a buffer polygon around each multi polygon in the polygon_data_item. The result is a polygon data item with the same domain as the polygon_data_item.
The buffer_distance is a value that specifies the width of the buffer in the units of the coordinate system. Positive values create an outward buffer (inflate), negative values create an inward buffer (deflate).
The nrPointsInCircle is a UInt8 value that specifies the number of points used to approximate rounded corners. A higher value results in a smoother buffer but increases computation time. The minimum value is 3.
The bp_ prefix of the function name indicates that the implementation of the operator uses the Boost Polygon library, which requires integer coordinates.
- attribute polygon_data_item with a polygon value type with integer coordinates (ipoint or spoint)
- parameter buffer_distance with an integer value type
- parameter nrPointsInCircle with a UInt8 value type
- The composition type of the polygon_data_item needs to be polygon.
- The polygon data item must have a point value type with integer coordinates (ipoint or spoint).
- nrPointsInCircle must be at least 3.
This function results in problems for (integer) coordinates larger than 2^25 (after translation where the first point is moved to (0, 0)). If your integer coordinates, for instance, represent mm, 2^25[mm] = about 33 [km]. We advise you to keep the size of your integer coordinates for polygons limited.
15.6.0
attribute<ipoint> buffered_geometry (polygon, district) := bp_buffer_multi_polygon(district/geometry, 100i, 8b);
More examples of buffer functions can be found here: Buffer processing example