[postgis-users] Re: Help: Ring not closed error when loading data via shp2pgsql
Gino Lucrezi
gino-postgis at lucrezi.net
Tue Aug 24 02:21:36 PDT 2004
> Could the "7" help find the polygon? What does it refer to?
The "7" refers to the line in the sql command file generated by shp2pgsql
You'll usually invoke it this way:
shp2pgsql (some options) | psql (some other options)
Try it this way:
shp2pgsql (some options) > intermediate_file
psql (some other options) < intermediate_file
This way, the file called intermediate_file will contain all sql commands used to create and populate the postgres table which will contain your data.
Have a look at the 7th line of that file, and you'll find the offending polygon. You can correct it by hand, if you wish, or you can see what data it corresponds to in the original shape file, and correct it in the shape file itself before trying to import it again.
If you have any more doubts, feel free to ask!
Gino Lucrezi
Penta Consulting Services
More information about the postgis-users
mailing list