-
Notifications
You must be signed in to change notification settings - Fork 56
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
Shapefile export-import workflow #12
Comments
I'm having the same issue. Any solution for this? |
@stollc unfortunately no 👎 |
I got this error when one of my fields was not in the supported types, meaning detected in JavaScript as typeof string, boolean, or number. In my case, I had an object inside my GeoJSON properties that I needed to stringify. When it doesn't detect the type, the buffer size attempts to multiple by a NaN and ends up being empty, causing the DataView to allocate 0 bytes, therefore writes to the DataView are outside of bounds. |
In the shp-write library, there is an error when setting the terminator of the dbf header. |
I'm working on a project that allows export of drawn geometries as shapefile and import of shapefiles for presentation on the map.
Right now I'm trying to implement the workflow when you can draw a feature, export it as shapefile, drag'n'drop it on the page again and it will be imported.
For shapefile export I'm using shp-write library, which is dependent on your lib, and shapefile-js for import. When the latter is trying to parse dbf file created by your library, I receive "Offset is outside the bounds of the DataView" in latest Chrome (there must be at least one property present for the feature in geojson, but it's another bug).
I have tried to open exported shapefile in QGIS and save it again, then shapefile-js library has no troubles parsing the created dbf. So I guess there's some difference between the dbf created by javascript vs. dbf created by QGIS. Any ideas where the bug might be?
The text was updated successfully, but these errors were encountered: