Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name headers are truncated #74

Closed
macsee opened this issue May 3, 2019 · 6 comments · Fixed by #96
Closed

Name headers are truncated #74

macsee opened this issue May 3, 2019 · 6 comments · Fixed by #96

Comments

@macsee
Copy link

macsee commented May 3, 2019

Hi,
I've a data set with name headers that are truncated to 8 chars length, however, the body data is displayed correctly. Is there any way to output more than 8 chars in headers, just like in body?
Thanks!

Cheers,
Maxi

@dioslibre
Copy link

No. It's a limitation of the DBF file format unfortunately. See this https://support.esri.com/en/technical-article/000007920

@davidbeers
Copy link

I have the same problem. The doc on the DBF file format says the limitation is 10 characters, but shp-write truncates field names to 8 characters.

@davidbeers
Copy link

It looks like this is a bug already reported in the mapbox/dbf package: mapbox/dbf#11

@srikanth0526
Copy link

srikanth0526 commented May 22, 2023

Search for this line in the library js file f.name.split('').slice(0, 8) and replace 8 with 10. Then I could able to see the 10 character name in the shape file.

Too simple right !!!

@sheindel
Copy link
Contributor

This is now fixed in dbf 0.2.0 and we hope to upgrade to that library revision change to this repo soon.

@sheindel
Copy link
Contributor

Good news: v0.4.2 is now available with this fix from dbf.

Less good news: Mapbox changed their deployment organization so this package is now hosted under a different package

@mapbox/shp-write
https://unpkg.com/@mapbox/shp-write@latest/shpwrite.js

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 a pull request may close this issue.

5 participants