[geos-devel] GEOSBuffer doesn't take all of my geometry

Robert Coup robert.coup at koordinates.com
Mon Apr 28 17:41:12 EDT 2008


On Tue, Apr 29, 2008 at 8:58 AM, Maximo Pech <makzpj at gmail.com> wrote:

> It's a polygon with many rings inside it. I'm trying to buffer it to make a intersection operation with a lot of other geometries because GEOS says it has a self-intersection at or near point -97.3814 26.0028, but after buffering it my geometry becomes:
<snip>
> All of the remaining rings are gone.

Thats how buffer() works ... what do you want to occur?
- buffer inner rings outwards?
- buffer inner rings inwards?
- buffer inner rings inwards or outwards depending on their hole-ness?

Basically you'd need to buffer each ring of the polygon separately,
then re-assemble them.

This is why "just buffer(0) it" isn't really a decent solution for
"fixing" invalid geometries... it might be worth having a look at this
thread from a week or so ago on the postgis list:
http://postgis.refractions.net/pipermail/postgis-users/2008-April/019390.html

- Rob :)


More information about the geos-devel mailing list