[postgis-users] Problem with ST_ExteriorRing and ST_contains

didier peeters dpeeter1 at ulb.ac.be
Wed May 19 01:03:30 PDT 2010


Hi everybody,



I'm a postgis new user and I would like to submit here a problem I encounter.  Here's what I do :

from a polygon layer I merge some of them (with ST_UNION) into bigger ones according to an attribute value, then I make an exterior ring (with ST_Collect(ST_ExteriorRing())) around these and then I fill these rings (with ST_Contains) with all the original polygon that are inside ( I do this to have a coherent area without the holes I would have otherwise because of some data particularities).  

All this works very fine for 99.9 % of the polygons but fails on filling the rings for a few of them.  When I look at these I see that they have a loop which is a probably due to a wrong geometry in the original polygons.  

Does any of you know how to deal with this ?  

Thanks for your help

Didier


More information about the postgis-users mailing list