[postgis-tickets] [PostGIS] #2623: pgsql2shp creates a dbf with 0 records when the table only has a geometry column

PostGIS trac at osgeo.org
Tue Apr 29 04:42:03 PDT 2014


#2623: pgsql2shp creates a dbf  with 0 records when the table only has a geometry
column
---------------------+------------------------------------------------------
 Reporter:  winkey   |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.2.0
Component:  postgis  |     Version:  2.0.x        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by landry):

 Fwiw, i've hit that issue too on a similar usecase, and in this case is
 still thing there's a bug in pgsql2shp since:

 - i imported a perfectly valid shapefile into postgis via shp2pgsql - it
 had not attributes, and the postgis table ended up with a gid attr and a
 the_geom attr - so far so good.
 - when trying to export back that table via pgsql2shp, it generates a
 'valid' shp (ie i can see the amount of features) but the dbf file is
 invalid/empty - thus the layer cant be open in say QGIS.

 ogrinfo -al foo.shp (on an extracted shape from postgis) will give me the
 feature count, but wont display the list of features..
 the same command on the source shape (ie before import into postgis) gives
 me the feature count and the list of point features in WKT.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2623#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list