PostGIS 1.5.
1 Manual
215 / 315
Note
This function ignores the third dimension (z) and will always give a 2-d buffer even when presented with a 3d-geometry.
Performed by the GEOS module.
This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1. s2.1.1.3
This method implements the SQL/MM specification. SQL-MM 3: 5.1.17
Note
People often make the mistake of using this function to try to do radius searches. Creating a buffer to to a radius search
is slow and pointless. Use ST_DWithin instead.
Examples
quad_segs=8 (default)
SELECT ST_Buffer(
ST_GeomFromText(POINT(100 90)),
50, quad_segs=8);
quad_segs=2 (lame)
SELECT ST_Buffer(
ST_GeomFromText(POINT(100 90)),
50, quad_segs=2);
PostGIS 1.5.1 Manual
216 / 315
endcap=round join=round (default)
SELECT ST_Buffer(
ST_GeomFromText(
LINESTRING(50 50,150 150,150 50)
), 10, endcap=round join=round);
join=bevel
SELECT ST_Buffer(
ST_GeomFromText(
LINESTRING(50 50,150 150,150 50)
), 10, join=bevel);
--A buffered point approximates a circle
endcap=square
SELECT ST_Buffer(
ST_GeomFromText(
LINESTRING(50 50,150 150,150 50)
), 10, endcap=square join=round);
join=mitre mitre_limit=5.0 (default mitre limit)
SELECT ST_Buffer(
ST_GeomFromText(
LINESTRING(50 50,150 150,150 50)
), 10, join=mitre mitre_limit=5.0);