Skip to content

bg_buffer_single_polygon

MaartenHilferink edited this page Jun 14, 2026 · 1 revision

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

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

see also

Clone this wiki locally