[postgis-users] pgsql2shp: date field

Peter Hopfgartner peter.hopfgartner at r3-gis.com
Fri Nov 27 05:28:52 PST 2009


Hi,

we currently have some interoperability problems with pgsql2shp 
generated shapes. Basically, if a date field is NULL, pgsql2shp writes 
all zeros to the file. This file can not be opened with gvSIG and 
OpenOffice, whereas it can be opened with ArcGIS and MS-Excel 2003 
(showing the zeros).

If I overwrite these zeros (from the hex editor) with spaces, all of the 
above programs do open and interpret the NULL value correctly.

I've attached a dump of the database and the generated shape file and 
the version with the zeros replaced with spaces.

I have not found any spec how dBase III should represent NULL data 
values and forward this problem to the ML, but the files written in 
ArcGIS use spaces, too.

Another issue: pgsql2shp writes the integer field "ID" aligned to the 
left, when written from ArcGIS it is aligned to the right.  Indeed, some 
tools seem to have problems in interpreting the value written.

Regards,

Peter

-- 
 
Dott. Peter Hopfgartner
 
R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
Email: peter.hopfgartner at r3-gis.com
Tel. : +39 0473 494949
Fax  : +39 0473 069902
www  : http://www.r3-gis.com

================================================================================
Venite a trovarci all'ASITA, dal 1 al 4 dicembre a Bari www.asita.it
Besuchen Sie uns bei der Messe ASITA vom 1. bis 4. Dezember in Bari www.asita.it
Visit us at ASITA, from 1st to 4th December in Bari www.asita.it
================================================================================

-------------- next part --------------
A non-text attachment was scrubbed...
Name: files_arcgis.zip
Type: application/zip
Size: 1251 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091127/4922afe5/attachment.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: files_without_spaces.zip
Type: application/zip
Size: 1361 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091127/4922afe5/attachment-0001.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: files_with_spaces.zip
Type: application/zip
Size: 1330 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091127/4922afe5/attachment-0002.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_shape.sql
Type: text/x-sql
Size: 1337 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091127/4922afe5/attachment.bin>


More information about the postgis-users mailing list