[postgis-users] Size of FTDate field in dbf files
Chris Hermansen
chris.hermansen at timberline.ca
Thu Apr 10 14:51:00 PDT 2008
I don't know how interesting this comment may be to the illustrious
readers of this list, but I'm going to offer it anyway...
Awhile ago, I was experimenting with a Python DBF library, and I noticed
it failing gracelessly on a shapefile that had some leading blanks on a
date field. Perhaps this shapefile was created by pgsql2shp? Could
easily have been the case on my desktop. I have no easy way of
replicating this situation... but anyway, maybe I'll try it again at
some point in the future when this patch leaks out into a release.
Paul Ramsey wrote:
> Patch applied in svn. Everyone else creating dated dbf files, keep an
> eye on them! It's not obvious why the original was written at 10 wide.
>
> On Thu, Apr 10, 2008 at 3:29 AM, Peter Hopfgartner
> <peter.hopfgartner at r3-gis.com> wrote:
>
>> Dear PostGIS developers
>>
>> After having changed the field size from 10 to 8 everything works fine as
>> expected.
>>
>> This means that the comment in file pgsql2shp.c, lines 2730,2731 is not
>> accurate anymore.
>>
>>
>> The attached diff is against the current SVN.
>>
>>
>> Best regards,
>>
>> Peter Hopfgartner and Sergio Segala
>> R3 GIS
>>
>> http://www.r3-gis.com
>>
>>
>>
>> Peter Hopfgartner wrote:
>>
>>
>>> Dear mailing list members,
>>>
>>> we had some problems when editing shape files containing dates generated
>>>
>> with pgsql2shp. In particular, editing these files with ArcGIS and some OS
>> desptop GIS (QGIS or OpenJump, sorry I can't remember exactly) the
>> attributes where shifted by some white spaces.
>>
>>> Looking at the files generated with pgsql2shp, we noted that a length of
>>>
>> 10 bytes is assigned to date fields (see also current the svn snapshot,
>> loader/pgsql2shp.c:2735,2736), in apparent contrast with the dbf file format
>> specification (http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm),
>> which specifies that these field are 8 bytes long.
>>
>>> Best regards,
>>>
>>> Peter Hopfgartner and Sergio Segala
>>> R3 GIS
>>>
>>> http://www.r3-gis.com
>>> _______________________________________________
>>> 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
>>
>>
>>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
--
Regards,
Chris Hermansen mailto:chris.hermansen at timberline.ca
tel+1.604.714.2878 · fax+1.604.733.0631 · mob+1.778.232.0644
Timberline Natural Resource Group · http://www.timberline.ca
401 · 958 West 8th Avenue · Vancouver BC · Canada · V5Z 1E5
More information about the postgis-users
mailing list