Opened 10 years ago

Closed 10 years ago

#893 closed defect (invalid)

Error loading (shp2pgsql or bad geometry)

Reported by: j03lar50n Owned by: pramsey
Priority: medium Milestone: PostGIS 1.4.3
Component: postgis Version: 1.4
Keywords: Cc:

Description

I'm struggling to import this .shp to PostGIS. Have tried changing the encoding, i deleted 'Shape_Length' and 'Shape_Area' columns. Tried shp2pgsql command-line, SPIT, pgAdminIII (shapeloader OpenGeo).

example error msg:

Failed SQL begins: "INSERT INTO "gis"."County_VegPolys_SLU" ("OBJECTID","Formation","Oaks",the_geom) VALUES ('31320','2','9','0106000020B5080000010000000103000020B50800000500000012180000103CB7B15364564120F8AA1B94104141B0123FD8526456418065C56892104141C0B6E64B5064564100D5CC11" Failed in pgui_exec(): server closed the connection unexpectedly

This probably means the server terminated abnormally before or while processing the request.

Failed record number #32245 Failed SQL begins: "INSERT INTO "gis"."County_VegPolys_SLU" ("OBJECTID","Formation","Oaks",the_geom) VALUES ('31321','2','9','0106000020B5080000010000000103000020B50800000100000006010000002E940B1D775641405DC9536F11414130859ACE1A77564140FE934867114141A078022D17775641402A14E7" Failed in pgui_exec(): no connection to the server

postgis_full_version


POSTGIS="1.4.0" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.7.1, 23 September 2009" USE_STATS

(1 row)

version


PostgreSQL 8.4.7 on i486-pc-linux-gnu, compiled by GCC gcc-4.4.real (Ubuntu 4.4.3-4ubuntu5) 4.4.3, 32-bit

(1 row)

Attachments (2)

County_VegPolys_bug-clip.zip (457.4 KB) - added by j03lar50n 10 years ago.
this data uploaded fine with SPIT but didn't with shp2pgsql
file.txt (1.3 MB) - added by j03lar50n 10 years ago.
output of sudo shp2pgsql -s 2229 -I -k County_VegPolys_bug-clip gis.VegPoly_bug_shp2pg -d slugis

Download all attachments as: .zip

Change History (6)

comment:1 Changed 10 years ago by nicklas

Yes

tried on 1.5

select '0106000020B5080000010000000103000020B50800000100000006010000002E940B1D775641405DC9536F11414130859ACE1A77564140FE934867114141A078022D17775641402A14E7'::geometry

crashes the server

/Nicklas

Changed 10 years ago by j03lar50n

this data uploaded fine with SPIT but didn't with shp2pgsql

Changed 10 years ago by j03lar50n

Attachment: file.txt added

output of sudo shp2pgsql -s 2229 -I -k County_VegPolys_bug-clip gis.VegPoly_bug_shp2pg -d slugis

comment:2 Changed 10 years ago by robe

Nicklas, That select crashes for me too on 1.5, but on PostGIS 2.0 my latest trunk build gives:

ERROR:  WKB structure does not match expected size!

comment:3 Changed 10 years ago by nicklas

yes i had the same in trunk version. i guess that is because the new storage format. the format of the geometry that crashes is only valid for 1.x PostGIS was my assumption.

/Nicklas

comment:4 Changed 10 years ago by j03lar50n

Resolution: invalid
Status: newclosed

User/operator error; I did not include the second part of the one-step shp2pgsql command - part after the |,(pipe) was neglected. Apologies.

Note: See TracTickets for help on using tickets.