[postgis-users] Problem with pgsql2shp .dbfs
Matthew Perry
perrygeo at gmail.com
Wed Aug 24 13:48:44 PDT 2005
Hello folks,
I've been using pgsql2shp to export my postgis tables as shapefiles.
It has always worked except in one particular case. I have a table
named "salinetrack" that, when exported yields the following files:
-rw-r--r-- 1 perrygeo perrygeo 466623 2005-08-24 12:51 salinetrack.dbf
-rw-r--r-- 1 perrygeo perrygeo 31940 2005-08-24 12:51 salinetrack.shp
-rw-r--r-- 1 perrygeo perrygeo 212 2005-08-24 12:51 salinetrack.shx
Using a number of GIs viewers (QGIS, Thuban, openEV, ArcGIS) the
shapefile shows up fine. However some applications refuse to open it
(JUMP, ArcView 3, ArcExplorer). I narrowed the problem down to the dbf
and when I do this:
cp salinetrack.dbf salinetrack_bad.dbf
then open salinetrack.dbf in openoffice then immediately save it
without making any changes, I am able to open it just fine in any GIS
application.
Here's the odd part. Check out the difference in file size between the
dbf output by pgsql2shp (salinetrack_bad.dbf) and the one saved by
openoffice:
ls -al *.dbf
-rw-r--r-- 1 perrygeo perrygeo 466623 2005-08-24 12:51 salinetrack_bad.dbf
-rw-r--r-- 1 perrygeo perrygeo 7325 2005-08-24 12:59 salinetrack.dbf
What could be causing this difference? Could pgsql2shp be exporting a
corrupted .dbf??
what steps should I take to begin debugging this problem? Oh we're
using postgis 1.0.1 with postgresql 8.0.3.
--
Matt Perry
perrygeo at gmail.com
http://www.perrygeo.net
More information about the postgis-users
mailing list