[postgis-users] help with pgsql2shp error

Sam Snellings ssnellings at gmail.com
Fri Nov 5 09:25:43 PDT 2010


I ran into an error while trying to use pgsql2shp to export a table of
geography LINESTRING() objects:

[XXX~]$ [XXX]/pgsql2shp -f testfile -p 58456 geo_test global_points
Initializing... Done (postgis major version: 1).
Output shape: PolyLine
*Dumping: XERROR: parse error - invalid geometry*

This above table was constructed by passing a series of user generated
lat/long points to a php function that then constructed a LINESTRING()
string to insert into the global_points table using pg_query().  I thought
perhaps there was a problem with my code on that side of the equation, so I
used the tutorial
construct a new table (airports) in a new database (geo_three) using
phpPgAdmin to insert the values to eliminate that possibility.  However, I
still received the same error:

[XXX~]$ [XXX]/pgsql2shp -f airportest -p 58456 -r geo_three airports
Initializing... WARNING: Cannot determine spatial reference (empty table or
unknown spatial ref). No prj file will be generated.
Done (postgis major version: 1).
Output shape: Point
*Dumping: XERROR: parse error - invalid geometry*

I'm afraid I'm lost on where this error is coming from - if I am not
providing enough information to diagnose please let me know.  Thanks in

Sam Snellings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20101105/168ec0db/attachment.html>

More information about the postgis-users mailing list