-
Notifications
You must be signed in to change notification settings - Fork 1
geos_buffer
Geometric functions > geos_buffer
- geos_buffer(geometry_data_item, buffer_distance, nrPointsInCircle)
geos_buffer(geometry_data_item, buffer_distance, nrPointsInCircle) creates a buffer polygon for each entry of the geometry_data_item, choosing the appropriate buffering at run-time from the composition of the first argument:
- polygon composition - behaves as geos_buffer_multi_polygon
- arc composition - behaves as geos_buffer_linestring
- multipoint composition - behaves as geos_buffer_multi_point
The result is always a polygon data item with the same domain unit as the geometry_data_item. Use geos_buffer when you want a single buffering operator that adapts to the geometry it is given; use the specific geos_buffer_* operators when you want to fix the interpretation.
The buffer_distance is a Float64 value that specifies the radius of the buffer in the units of the coordinate system of the geometry_data_item.
The nrPointsInCircle is a UInt8 value that specifies the number of points used to approximate the circle. 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.
- attribute geometry_data_item with a point value type and arc, polygon or multipoint composition
- parameter buffer_distance with a Float64 value type
- parameter nrPointsInCircle with a UInt8 value type
- The composition of the geometry_data_item must be arc, polygon or multipoint; any other composition raises an error.
- buffer_distance must be a positive value.
- nrPointsInCircle must be at least 3.
20.2.0
// arc geometry -> linestring buffer
attribute<fpoint> road_buffer (road) := geos_buffer(road/geometry, 50.0, 8b);
// polygon geometry -> polygon buffer
attribute<fpoint> district_buffer (district) := geos_buffer(district/geometry, 25.0, 16b);
// multipoint geometry -> per-point buffer
attribute<fpoint> station_buffer (city) := geos_buffer(city/stations, 100.0, 16b);
- geos_buffer_multi_polygon
- geos_buffer_linestring
- geos_buffer_multi_point
- geos_buffer_point
- Composition
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.