0% found this document useful (0 votes)
10 views

Examples: Postgis 1.5.1 Manual

This document provides information about the ST_Buffer function in PostGIS. It notes that ST_Buffer ignores the z dimension and creates a 2D buffer. It implements the OpenGIS and SQL/MM specifications for buffering. The document warns against using ST_Buffer for radius searches and recommends ST_DWithin instead. It provides examples of buffering points, lines, and polygons with different parameters.

Uploaded by

Mathias Eder
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Examples: Postgis 1.5.1 Manual

This document provides information about the ST_Buffer function in PostGIS. It notes that ST_Buffer ignores the z dimension and creates a 2D buffer. It implements the OpenGIS and SQL/MM specifications for buffering. The document warns against using ST_Buffer for radius searches and recommends ST_DWithin instead. It provides examples of buffering points, lines, and polygons with different parameters.

Uploaded by

Mathias Eder
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

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

You might also like