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

PostGIS trac at osgeo.org
Thu Jan 30 12:17:15 PST 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.1.2
Component:  postgis  |     Version:  2.0.x        
 Keywords:           |  
---------------------+------------------------------------------------------
 here is an output shapefile here
 [https://github.com/opengdp/opengdp/raw/6b737b0377228421d442ecb289889d97dc663115/share/data/bridges.zip]


 following is part of a conversation in #gdal


 [11:54:18] <EvenR> winkey: the DBF file isn't consistant with the SHP. It
 indicates 0 records[[BR]]
 [11:59:51] <EvenR> the driver could/should perhaps emit a warning if
 there's an inconsistency at that level, but it would be best to know why
 pgsql2shp generate such file ? Perhaps your table had no attribute ?[[BR]]
 [12:00:27] <winkey> no pkey must be the issue[[BR]]
 [12:00:52] <winkey> it was only a geom collumn[[BR]]
 [12:01:46] <EvenR> I think they should generate a dummy ID column with the
 PKID for better compatibility[[BR]]
 [12:02:04] <EvenR> that's what the ogr shape driver does when you create a
 shapefile without field[[BR]]

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2623>
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