Closed macsee closed 10 months ago
No. It's a limitation of the DBF file format unfortunately. See this https://support.esri.com/en/technical-article/000007920
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.
It looks like this is a bug already reported in the mapbox/dbf package: https://github.com/mapbox/dbf/issues/11
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 !!!
This is now fixed in dbf
0.2.0 and we hope to upgrade to that library revision change to this repo soon.
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
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