[geos-devel] polygon with overlapping edges

Jasmin FORMONT JFORMONT at siradel.com
Fri Apr 13 09:48:20 EDT 2012


I tried a buffer(0), but it splits my geometry in two separate polygons. And I can't use postgis.

But is it a normal behavior that this kind of polygon is not supported ? I didn't explain the error I get : when I try to apply a difference (or any topologic operation) on this polygon with another (a "regular" one), it throws a TopologyException: side location conflict.

-----Message d'origine-----
De : geos-devel-bounces at lists.osgeo.org [mailto:geos-devel-bounces at lists.osgeo.org] De la part de Sandro Santilli
Envoyé : vendredi 13 avril 2012 14:40
À : GEOS Development List
Objet : Re: [geos-devel] polygon with overlapping edges

On Fri, Apr 13, 2012 at 11:52:20AM +0200, Jasmin FORMONT wrote:
> Hi everyone
> 
> I am currently testing some GEOS features.
> I am having trouble with polygons with overlapping edges. You can see attached an example of what I use (dxf file).
> When loaded as a GEOS polygon, it is considered not valid. Is there any way to avoid this problem ? Maybe a GEOS function making this polygon
> valid by slightly moving some points ?
> 
> I have no influence on the input polygons, they are produced like that by our production chain and changing this is not an option.
> 
> thanks for any tip

Try a buffer with distance 0.
Or try PostGIS 2.0 (has an ST_MakeValid function).

--strk;

  ,------o-. 
  |   __/  |    Delivering high quality PostGIS 2.0 !
  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
  `-o------'

_______________________________________________
geos-devel mailing list
geos-devel at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel


More information about the geos-devel mailing list