Skip to main content
Returns a Geography whose interior is the metric ε-buffer of the input on the sphere. The distance argument is always interpreted as meters along the spheroid — there is no useSpheroid flag because Geography is inherently spheroidal. ST_Buffer of a Geography point on the sphere ST_Buffer of a Geography polygon on the sphere Internally, Sedona projects the input to the most appropriate UTM zone (selected via ST_BestSRID), applies a planar buffer in that zone, and projects the result back to lon/lat. This produces accurate results for inputs that fit inside a single UTM zone (~6° wide). For larger inputs the same accuracy caveats apply as for ST_Buffer on Geometry with useSpheroid = true.
useSpheroid is not accepted for Geography inputs. The 3-argument form ST_Buffer(geom, distance, useSpheroid: Boolean) from the Geometry overload is rejected when the first argument is a Geography (Geography is inherently spheroidal, so the flag would be redundant or contradictory). It raises IllegalArgumentException. Drop the useSpheroid argument, or — for a planar buffer — convert to Geometry first via ST_GeogToGeometry and use the Geometry overload of ST_Buffer.
The optional parameters string accepts the same JTS-style key/value pairs used by ST_Buffer for Geometry:
KeyDefaultAllowed values
quad_segs8positive integer — segments per quadrant in curved corners
endcaproundround, flat, butt, square
joinroundround, mitre (or miter), bevel
mitre_limit (or miter_limit)5.0positive decimal
sidebothboth, left, right (single-sided buffer for linestrings)
Notes:
  • A negative distanceMeters shrinks polygons (returning a smaller polygon, possibly EMPTY when the radius exceeds the polygon’s narrowest dimension); for points and lines a negative buffer always produces an empty result.
  • The output Geography preserves the input’s SRID. If the input has no SRID set, the result is normalized to WGS84 (EPSG:4326).

Signatures

ST_Buffer (geog: Geography, distanceMeters: Double)
ST_Buffer (geog: Geography, distanceMeters: Double, parameters: String)

Parameters

geog
Geography
required
The geography to buffer.
distanceMeters
Double
required
The buffer radius, in meters along the spheroid. Negative values shrink polygons.
parameters
String
Optional JTS-style buffer style parameters (see the table above).

Return type

The buffered geography.

Example

-- 1 km buffer around a point
SELECT ST_AsText(ST_Buffer(ST_GeogFromWKT('POINT(0 0)', 4326), 1000));

-- 200 m buffer around a polygon, with low-fidelity corners
SELECT ST_AsText(ST_Buffer(
  ST_GeogFromWKT('POLYGON((0 0, 0.01 0, 0.01 0.01, 0 0.01, 0 0))', 4326),
  200,
  'quad_segs=4 endcap=square'
));

-- Use the buffer as a containment test
SELECT ST_Contains(
  ST_Buffer(ST_GeogFromWKT('POINT(0 0)', 4326), 1000),
  ST_GeogFromWKT('POINT(0.005 0.005)', 4326)
);