[geos-devel] blowing up on negative value buffer() call
Leo Shklovskii
leo at energysavvy.com
Fri Oct 30 17:23:17 EDT 2009
Hi Geos-Devel,
I'm using GeoDjango (which wraps GEOS) to manipulate some polygons
representing states, cities & counties.
We simplify many of the polygons in our original census dataset and as a
result, some of them overlap (when they didn't originally). Because of
this, I need to reduce some of them in size before I run queries on them
to prevent wrong results from 'intersects' queries.
The first thing I tried seems to work fairly well:
location.mpoly.buffer(-.01).buffer(0)
Ideally, the first call shrinks the poly and the second one makes sure
that its valid.
Unfortunately, I've found several polygons that are valid but cause the
first call to buffer() to blow up (memory leak + spiked cpu + doesn't
return).
Should I file this as a GEOS bug? or am I not using buffer() correctly?
If the latter, what would be a better way to shrink a polygon?
Thanks in advance for your time!
--
--Leo
More information about the geos-devel
mailing list