[postgis-users] pgsql2shp
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Tue Jul 3 02:48:43 PDT 2012
On 03/07/12 07:14, James Sewell wrote:
> Hello,
>
> When I run pgsql2shp like so:
>
> pgsql2shp -u plm25 -g the_geom database table
>
> I get the following output:
>
>
> Xcolumn number -1 is out of range 0..1
> column number -1 is out of range 0..1
> column number -1 is out of range 0..1
> column number -1 is out of range 0..1
> column number -1 is out of range 0..1
> column number -1 is out of range 0..1
> column number -1 is out of range 0..1
> column number -1 is out of range 0..1
> column number -1 is out of range 0..1
> column number -1 is out of range 0..1
> column number -1 is out of range 0..1
> column number -1 is out of range 0..1
>
> This continues in blocks for (I assume) each row in the table.
>
> When I go to load the shape I get null values for all rows as follows:
>
> INSERT INTO "table" (the_geom) VALUES (NULL);
>
> My versions are:
>
> PostgreSQL 9.1.4 on sparc-sun-solaris2.10, compiled by cc: Sun C 5.11 SunOS_sparc 145354-05 2011/09/13, 64-bit
>
> POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.1, released 2012/05/15 GDAL_DATA not found" LIBXML="2.7.8" LIBJSON="UNKNOWN" R
> ASTER
>
> Any ideas? This is a fresh table, not migrated form an old version.
That's strange - I don't see that error message within the PostGIS
codebase at all, so maybe it is coming from libpq. Do you see that error
with just that one table, or with a shapefile you have loaded using
shp2pgsql?
Any chance of sharing your table schema with us, e.g. the output of \d
<table> in psql?
ATB,
Mark.
More information about the postgis-users
mailing list