-
Notifications
You must be signed in to change notification settings - Fork 14
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
[BUG] Error with specific shapefile #51
Comments
Hmm GDAL/shapelib has been dealing with bad shapefiles in the wild for a long time, and manages to read anything that somewhat resembles a shapefile. For this package we just read the spec and tried to implement that. So if GDAL can read it, it doesn't mean it is necessarily a bug. If I export your file from QGIS (or do a gdal_translate), I get a shapefile that this package can read without problem, suggesting this may be the case here. |
You mean that GDAL does extra effort to read shape files that are not compliant with the spec? From your comment I understood that there is no bug in Shapefile.jl because it implements the spec, and that I should probably use GDAL or QGIS or any other software to clean the "messy" file before coming back to Shapefile.jl. Does that sound reasonable? |
Yes exactly, I think that is likely the case. Unfortunately there doesn't seem to be a shapefile validator that can tell us what's wrong with it. |
I got a bit curious what it is that breaks the reading of the file, it looks like the shapefile does include some additional data between the records and since we currently do not use .shx files to retrieve the positions at which records start, the reading fails. #52 would implement a way to read the shapefile, given there is a valid index file, at least I could parse the file provided by @juliohm |
Closed by #52 |
Attached is a MWE with a specific shape file that is successfully loaded by GDAL: https://drive.google.com/drive/folders/1EerBvkuS8h3SX20nbqjxq__FhiUaL3yO?usp=sharing
The same file produces an error with Shapefile.jl:
I am using this dataset for the first time, so the problem may be in the data itself. Appreciate if you can take a look.
The text was updated successfully, but these errors were encountered: