Skip to content

Conversation

stefanb
Copy link
Contributor

@stefanb stefanb commented Apr 6, 2015

DBF file structure allows up to 11 characters/bytes in the field name (http://en.wikipedia.org/wiki/.dbf#File_Architecture_Overview), while ShapeFile spec sets the limit to 10 (http://en.wikipedia.org/wiki/Shapefile ) within the same DBF.

This change allows reading longer field names. Writing such files could be seen as producing non-standard compliant, but reading them does no harm (null characters are stripped out anyway).

We're using this on http://raba.openstreetmap.si since
openstreetmap-si/raba.openstreetmap.si@b72c357
(dbf files within shapefile zips were adjusted with bbe to insert an extra character)

DBF file structure allows up to 11 characters/bytes in the field name (http://en.wikipedia.org/wiki/.dbf#File_Architecture_Overview), while ShapeFile spec sets the limit to 10 (http://en.wikipedia.org/wiki/Shapefile ) within the same DBF. 

This change allows reading longer field names. Writing such files could be seen as producing non-standard compliant, but reading them does no harm (null characters are stripped out anyway).

We're using this on http://raba.openstreetmap.si since
openstreetmap-si/raba.openstreetmap.si@b72c357
(dbf files within shapefile zips were adjusted with [bbe](http://linux.die.net/man/1/bbe) to insert an extra character)
@calvinmetcalf
Copy link
Owner

a test would be great do I don't accidentally revert it

@stefanb
Copy link
Contributor Author

stefanb commented Apr 8, 2015

Added that, and an extra tests so that you don't break it for us. :)

stefanb referenced this pull request in openstreetmap-si/raba.openstreetmap.si Apr 25, 2015
@calvinmetcalf calvinmetcalf mentioned this pull request May 15, 2015
@calvinmetcalf calvinmetcalf merged commit b844912 into calvinmetcalf:master May 15, 2015
@stefanb stefanb deleted the patch-1 branch May 15, 2015 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants