On 11/1/2010 4:29 PM, ByronCinNz wrote:
SELECT ST_BuildArea( ST_Union( ‘LINESTRING EMPTY’, ST_ExteriorRing( ‘POLYGON((...))’ ) )The circumstances in which this method fails is when there are interior rings inside the invalid polygon. The interior rings disappear - which would be expected because the process is only looking for exterior rings.
Try using ST_Boundary() instead of ST_ExteriorRing(). It will return the linework that makes up a polygon (the exterior and interior rings). You could also try buffering your polygon by 0, ST_Buffer(geom, 0). This has the side effect of deconstructing and reconstructing your polygon.
-- Kevin _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
