[postgis-users] pgsql2shp: date field

Peter Hopfgartner peter.hopfgartner at r3-gis.com
Mon Nov 30 04:01:00 PST 2009


I've tried to fix the problem with the left padding, too.

The resulting shape files open cleanly in ArcGIS and gvSIG. Also 
inspection with a tool from Borland, ("Database Desktop") has no 
complaints about those files.

This patch inclued your fix about the rapprsentation of tha NULL date.

Regards,

Peter

Paul Ramsey wrote:
> I've placed a ticket on this with a patch
>
> http://trac.osgeo.org/postgis/ticket/321
>
> If you would try and patch and see if it creates files that are more
> broadly usable, that would be nice.
>
> Thanks,
>
> Paul
>
> On Fri, Nov 27, 2009 at 5:28 AM, Peter Hopfgartner
> <peter.hopfgartner at r3-gis.com> wrote:
>   
>> 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
>> ================================================================================
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
>>     
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>   


-- 
 
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: pgsql2shp.c.patch
Type: text/x-patch
Size: 3510 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091130/e6f54d06/attachment.bin>


More information about the postgis-users mailing list