ST_Buffer
Determine a buffer region around a geometry.
Syntax
ST_Buffer(geo, distance[, nSegs[, unit]]);
- geo
- The input geometry.
Type: ST_GEOMETRY(ANY)
- distance
- The buffer distance.
Type: DOUBLE
- nSegs
- The number of segments used to approximate a quarter of a circle.
Type: INT
Default: 8
- unit
- The units. Possible values include 'meter', 'kilometer', 'foot', 'mile', and 'nautical
mile'.
Type: VARCHAR(ANY)
Default: 'meter'
Returns
A value of type ST_GEOMETRY(ANY) that contains a geometry that is the buffer region around the specified input geometry.
Examples
SELECT inza..ST_AsText(inza..ST_Buffer(inza..ST_Point(0, 0,
27700), 1, 2));
ST_ASTEXT
---------------------------------------------------------------
POLYGON ((1 0, 0.70710000023246 0.70710000023246, 0 1,
-0.70710000023246 0.70710000023246, -1 0, -0.70710000023246
-0.70710000023246, 0 -1, 0.70710000023246 -0.70710000023246, 1
0))
(1 row)
ST_ASTEXT
SELECT inza..ST_AsText(inza..ST_Buffer(inza..ST_Point(0, 0,
27700), 1, 2, 'foot'));
ST_ASTEXT
---------------------------------------------------------------
POLYGON ((0.30480000004172 0, 0.21549999993294
0.21550000086427, 0 0.30480000004172, -0.21549999993294
0.21550000086427, -0.30480000004172 0, -0.21549999993294
-0.21550000086427, 0 -0.30480000004172, 0.21549999993294
-0.21550000086427, 0.30480000004172 0))
(1 row)
SELECT inza..ST_AsText(inza..ST_Buffer(inza..ST_Point(0, 0,
27700), 1, 2, 'meter'));
ST_ASTEXT
---------------------------------------------------------
POLYGON ((1 0, 0.70710000023246 0.70710000023246, 0 1,
-0.70710000023246 0.70710000023246, -1 0,
-0.70710000023246 -0.70710000023246, 0 -1,
0.70710000023246 -0.70710000023246, 1 0))
(1 row)