-
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
"ERROR: EOFError: read end of file" on filr that opens without issue using other software #100
Comments
(Its possible either that qgis is silently handling a real problem with the file, or that we are misidentifying the file) |
QGIS loads the shapefile as a |
Ok well there is a good chance its actually an error in the file, see #54 for discussion. But it could also be a bug here. It would be very useful if you could verify that either way. Does qgis warn, or maybe fill some zs with zeros? |
A couple more data points:
ERROR: ArgumentError: invalid Array dimensions
Stacktrace:
[1] Array
@ ./boot.jl:477 [inlined]
[2] Array
@ ./baseext.jl:23 [inlined]
[3] _partvec
@ ~/.julia/packages/Shapefile/yESZK/src/utils.jl:1 [inlined]
[4] _readparts
@ ~/.julia/packages/Shapefile/yESZK/src/utils.jl:6 [inlined]
[5] read(io::IOStream, #unused#::Type{Shapefile.PolygonZ})
@ Shapefile ~/.julia/packages/Shapefile/yESZK/src/polygons.jl:221
[6] _read_handle_inner(io::IOStream, ::Type{Shapefile.PolygonZ}, header::Shapefile.Header, shapes::Function, index::Nothing; path::String)
@ Shapefile ~/.julia/packages/Shapefile/yESZK/src/handle.jl:59
[7] read(io::IOStream, ::Type{Shapefile.Handle}, index::Nothing; path::String)
@ Shapefile ~/.julia/packages/Shapefile/yESZK/src/handle.jl:45
[8] read
@ ~/.julia/packages/Shapefile/yESZK/src/handle.jl:42 [inlined]
[9] #13
@ ~/.julia/packages/Shapefile/yESZK/src/handle.jl:20 [inlined]
[10] open(f::Shapefile.var"#13#14"{String, Nothing}, args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base ./io.jl:395
[11] open
@ ./io.jl:392 [inlined]
[12] Handle
@ ~/.julia/packages/Shapefile/yESZK/src/handle.jl:19 [inlined]
[13] Shapefile.Handle(path::String)
@ Shapefile ~/.julia/packages/Shapefile/yESZK/src/handle.jl:19
[14] top-level scope
@ REPL[1]:1 |
The issue seems to be in the polygon read function Specifically for this shapefile Now the question is
|
Does anyone know of another PolygonZ dataset that I could test on? |
Hmm Would the last polygon always be empty? (Ther are z polygons in the test data, have a look at the tests) |
Maybe also check against the polygon spec |
You are right, |
Ohhh probably that "optional" star next to the M values is the problem! We dont actally handle that. I guess we need to check the offsets to see if M should be there or not. We will need a way to embed that in the type too, like an M type parameter that is |
That is something that will need to be added but it doesn't seem to be the issue in this case... when I don't read M values and instead populate with filler values I still get the same end-of-file error... I'm giving up for now and chalking it up to an issue with the file itself as zvalues and mvalues are read without issue for all parts excluding the last. |
I get a "EOFError: read end of file" error when reading in a shapefile that opens without issue in QGIS. I poked around a bit but could't identify the issue.
The text was updated successfully, but these errors were encountered: