bg_buffer_single_polygon
Geometric functions bg_buffer_single_polygon
syntax
- bg_buffer_single_polygon(polygon_data_item, size, nr_angles)
definition
bg_buffer_single_polygon(polygon_data_item, size, nr_angles) results in a Polygon Data item with a buffer polygon around each polygon in the polygon_data_item. The resulting data item has the same Domain unit as the polygon_data_item.
It has the same signature and result as Bg_buffer_multi_polygon, but each entry of the polygon_data_item is treated as a single polygon (one outer ring with its inner rings) rather than as a multi polygon. Use it when each entry contains exactly one polygon; it avoids the multi-polygon bookkeeping and can be faster.
The size argument indicates the buffer size: use a positive value to grow polygons and a negative value to shrink them.
The nr_angles argument indicates how many angles are used to approximate rounded corners. More angles result in smoother buffers but also in more data.
The bg_ prefix of the function name indicates that the implementation of the operator uses boost geometry library, more specifically, the buffer function.
applies to
- Attribute polygon_data_item with a point Value type and a composition type polygon.
- Data item size with a Float64 value type
- Data item nr_angles with a Uint8 value type
since version
14.1.1
example
attribute<fpoint> polygon_buffer (polygon, district) := bg_buffer_single_polygon(polyset/geometry, 10.0, 16b);
more examples of buffer functions can be found here: Buffer processing