-
Notifications
You must be signed in to change notification settings - Fork 120
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
Debugging ZIP-ed shapefile parsing? #49
Comments
so that looks to be an issue with the shapefile, you could try forking this repo and substituting your file for the demo one, but instead of pointing to the zipped version put all the varius files and point to them minus the extention |
Thanks Calvin, Yes, I believe it's unique to this shapefile, but it's a professionally-produced survey and it works with the desktop ThinkGeo library (I attached the shapefile ZIP to my message). There's no "debug" switch I can throw to dump detailed information from leaflet.shapefile? Just being a lazy developer... |
Best guess is that there's an uneven number of rows in the shape file. Should we adjust the code to exit the loop when there are less than 28 bytes left? Increase error checking in getRow()? ParseShp.prototype.getRows = function() { |
I have a zipped shapefile that generally works with stand-along shapefile tools, but which fails with the demo upload application. The error generated are:
shit RangeError: Invalid DataView length -4
at new DataView ()
at ParseShp.getRow (shp.js:sourcemap:419)
at ParseShp.getRows (shp.js:sourcemap:407)
at new ParseShp (shp.js:sourcemap:371)
at module.exports (shp.js:sourcemap:429)
at shp.js:sourcemap:103
at Array.map ()
at Function.shp.parseZip (shp.js:sourcemap:92)
at shp.js:sourcemap:140
at tryToUnwrap (shp.js:sourcemap:3000)
blob:http://leaflet.calvinmetcalf.com/40feeb75-ebed-4a72-9e49-67f0c8707e95:15 shit
How can I dig into this error tracking down what I've done wrong in the shapefile? Or what alternate steps should I use when I have an issue like this to track it. I guess I could try parsing the shapefile component files...
Thanks!
Rotor.zip
The text was updated successfully, but these errors were encountered: