ST_BUFFER()

All functions > GEOSPATIAL > ST_BUFFER()

Returns a geometry/geography that represents all points within a given distance of the input.

Signatures

Buffer

Returns: Buffered polygon (GEOM_POLYGON or GEOG_POLYGON)

ST_BUFFER(geo: T, distance: DOUBLE) → Polygon
sql
ParameterTypeRequiredDescription
geoTYesGeometry or geography value
distanceDOUBLEYesBuffer distance

With:

  • T : Custom types: GEOM_POINT | GEOM_LINESTRING | GEOM_POLYGON | GEOM_MULTIPOINT | GEOM_MULTILINESTRING | GEOM_MULTIPOLYGON | GEOM_MULTIANY | GEOG_POINT | GEOG_LINESTRING | GEOG_POLYGON | GEOG_MULTIPOINT | GEOG_MULTILINESTRING | GEOG_MULTIPOLYGON | GEOG_MULTIANY

Signature notes:

  • On GEOMETRY: distance is in SRID coordinate units
  • On GEOGRAPHY: distance is in meters
  • Point + buffer produces a polygon that approximates a circle with straight segments; ST_AREA of a unit-radius buffer is therefore slightly below π (not the exact disk area)
  • LineString + buffer produces a corridor polygon
  • Negative distance on Polygon shrinks it (inset); on Point/LineString produces empty geometry
  • Returns NULL if any input is NULL

Examples

FeatureQL
SELECT
    f1 := ST_AREA(ST_BUFFER(ST_GEOMPOINT(0.0, 0.0), 1.0)) -- Area of a unit-radius buffer (polygon approximation; slightly less than π)
;
Result
f1 VARCHAR
3.121445152258052

Last update at: 2026/05/26 17:22:09