This is an example of a known issue with GEOS/JTS buffering. The problem occurs when using a relatively large buffer distance on geometries which have a large number of vertices which are relatively dense (i.e. the distance between adjacent vertices is much smaller than the requested buffer distance).

A couple of ways to avoid this problem are:
- simplify the input geometry using a tolerance which gets rid of most of the very dense vertices (use a tolerance of say from 1% to 10% of the buffer distance) - buffer the geometry mulitple times, starting with a very small buffer distance and gradually increasing it


Andi Vajda wrote:

 Hi,

Running on Mac OS X 10.5.4 with 4gb of RAM and postgis_full_version() of
POSTGIS="1.3.2" GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.0, 21 Dec 2007" USE_STATS

I get a runaway postgres process if I call ST_Buffer(shape, 0.1) on the attached WKT shape. My postgresql server eventually exhausts the swap space over 9gb.

It's a polygon with 12271 points representing the state of Alabama.
When converted to GeoJSON it renders correctly at [1].
Is this shape triggering some bug ?

Thanks !

Andi..

[1] http://openlayers.org/dev/examples/vector-formats.html
------------------------------------------------------------------------

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to