Opened 13 years ago

Closed 13 years ago

#1479 closed defect (fixed)

Pgsql2shp: Dumping: XWKB structure does not match expected size!

Reported by: jomarlla Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: pgsql2shp wkb Cc:

Description

Pgsql2shp creates a wrong shape file.

\d viariachedis1
                                    Table "public.viariachedis1"
 Column |             Type             |                          Modifiers                          
--------+------------------------------+-------------------------------------------------------------
 gid    | integer                      | not null default nextval('viariachedis1_gid_seq'::regclass)
 geom   | geometry(MultiPolygon,23030) | 
Indexes:
    "viariachedis1_pkey" PRIMARY KEY, btree (gid)


pgsql2shp -f viariachedis1 -u postgres -P pg r8844-1 viariachedis1

Initializing... 
Done (postgis major version: 2).
Output shape: Polygon
Dumping: XWKB structure does not match expected size!

At least the dbf file is corrupted:

-rw-r--r-- 1 alumno users        1 Jan 16 16:43 viariachedis1.dbf
-rw-r--r-- 1 alumno users   842704 Jan 16 16:43 viariachedis1.shp
-rw-r--r-- 1 alumno users      100 Jan 16 16:43 viariachedis1.shx

Change History (4)

comment:1 by strk, 13 years ago

Can you share the shapefile ? An URL or an attachment here.

in reply to:  1 comment:2 by jomarlla, 13 years ago

Replying to strk:

Can you share the shapefile ? An URL or an attachment here.

You can download the file from here: http://intercambio.upv.es/download.php?id=5633aaf37c05fe68ef8f442c59920ac3

Sorry I couldnt find out the row which is producing the problem so I uploaded the whole layer.

I got the same problem with r8870

comment:3 by pramsey, 13 years ago

There's a null geometry in there (gid == 60) , which is where it dies, not clear why yet. On its own pgsql2shp handles it fine. Without the null, pgsql2shp works. With just one non-null, everything works still.

comment:4 by pramsey, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk at r8972

Note: See TracTickets for help on using tickets.