[postgis-users] Help: Ring not closed error when loading data viashp2pgsql

Ethan Alpert ealpert at digitalglobe.com
Tue Aug 24 06:31:54 PDT 2004


I have written a perl script that uses Geo::Shapelib that adds the duplicate point I can send you. You'll need to install Geo::Shapelib from cpan.org. If the shapefile doesn't have many features then it's probably easier to do it by hand.
 
-e

________________________________

From: postgis-users-bounces at postgis.refractions.net on behalf of Wood Brent
Sent: Mon 8/23/2004 11:30 PM
To: PostGIS Users Discussion
Subject: [postgis-users] Help: Ring not closed error when loading data viashp2pgsql





I have a shapefile to load into PostGIS.

When I run the SQL created with shp2pgsql, I get the following message,
psql:ross020107.sql:7: ERROR:  polygon has ring where first point != last point
followed by errors until the failed commit statement.

The polygons contain several rings & several thousand vertices, and I have
potentially a few hundred shapefiles to load.

Is there any way to give a more verbose error message to help identify the
erroneous Ring so I can edit in the closing coordinate pair.

Could the "7" help find the polygon? What does it refer to?

Any suggestions as to how I can get closer to identifying the offending
polygon/ring appreciated.



Thanks,

   Brent Wood
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 4655 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20040824/36ca8789/attachment.bin>


More information about the postgis-users mailing list