[postgis-users] ERROR: geometry contains non-closed rings

Phil James borntopedal at yahoo.co.uk
Tue Sep 13 08:02:39 PDT 2011


If you are exporting from ArcMap (and have a copy of the software) then run the Repair Geometry tool before export.  This seems to fix most issues with non closed rings that surface in PostGIS and other tools.

Phil



>________________________________
>From: Ben Madin <lists at remoteinformation.com.au>
>To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
>Sent: Thursday, 18 August 2011, 17:34
>Subject: Re: [postgis-users] ERROR: geometry contains non-closed rings
>
>G'day Puneet,
>
>Maybe you could start with :
>
>SELECT gid, st_isvalidreason(the_geom), st_summary(the_geom) FROM data WHERE st_isclosed(the_geom) is FALSE;
>
>cheers
>
>Ben
>
>On 19/08/2011, at 12:19 AM, Mr. Puneet Kishor wrote:
>
>> 
>> I loaded a bunch of data (that came from ArcMap) into PostGIS (1.5.3) via shp2pgsql and am trying to draw it with MapServer 6.0.1. I get
>> 
>>> msDrawMap(): Image handling error. Failed to draw layer named 'foo'. 
>>> msPostGISLayerWhichShapes(): Query error. Error (ERROR: geometry contains non-closed rings ) 
>> 
>> 
>> Many thanks in advance for your suggestions.
>> 
>> --
>> Puneet Kishor
>> 
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110913/d272dac8/attachment.html>


More information about the postgis-users mailing list