geos_buffer_multi_polygon - ObjectVision/GeoDMS GitHub Wiki

Geometric functions > geos_buffer_multi_polygon

syntax

  • geos_buffer_multi_polygon(polygon_data_item, buffer_distance, nrPointsInCircle)

description

geos_buffer_multi_polygon(polygon_data_item, buffer_distance, nrPointsInCircle) creates an expanded (positive buffer) or contracted (negative buffer) polygon for each element in the polygon_data_item. The result is a polygon data item with the same domain as the input.

The buffer_distance is a Float64 value that specifies the buffer distance in the units of the coordinate system. A positive value expands the polygon outward; a negative value contracts it inward.

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 geos_ prefix of the function name indicates that the implementation of the operator uses geos.

applies to

conditions

  1. The composition type of the polygon_data_item needs to be polygon.
  2. The order of points in the polygon_data_item needs to be clockwise for exterior bounds and counterclockwise for holes (right-hand-rule).
  3. nrPointsInCircle must be at least 3.

since version

18

example

// Expand each municipality polygon by 500 metres
attribute<fpoint> buffered_geometry (municipality) := geos_buffer_multi_polygon(municipality/geometry, 500.0, 16b);

// Contract each polygon by 100 metres (negative buffer)
attribute<fpoint> contracted_geometry (district) := geos_buffer_multi_polygon(district/geometry, -100.0, 16b);

see also

⚠️ **GitHub.com Fallback** ⚠️