Skip to content

geos_buffer

MaartenHilferink edited this page Jun 14, 2026 · 1 revision

Geometric functions > geos_buffer

syntax

  • geos_buffer(geometry_data_item, buffer_distance, nrPointsInCircle)

description

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:

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.

applies to

conditions

  1. The composition of the geometry_data_item must be arc, polygon or multipoint; any other composition raises an error.
  2. buffer_distance must be a positive value.
  3. nrPointsInCircle must be at least 3.

since version

20.2.0

example

// 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);

see also

GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.

Clone this wiki locally