Shapefile.jl icon indicating copy to clipboard operation
Shapefile.jl copied to clipboard

`zip` reader not decompressing things properly?!

Open asinghvi17 opened this issue 1 year ago • 0 comments

MWE:

julia> feature = Shapefile.Table("/Users/anshul/downloads/not_ocean.zip")
ERROR: ArgumentError: Month: 22 out of range (1:12)
Stacktrace:
 [1] Dates.Date(y::Int64, m::Int64, d::Int64)
   @ Dates ~/.julia/juliaup/julia-1.10.5+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Dates/src/types.jl:257
 [2] Date
   @ ~/.julia/juliaup/julia-1.10.5+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Dates/src/types.jl:402 [inlined]
 [3] DBFTables.Header(io::IOBuffer)
   @ DBFTables ~/.julia/packages/DBFTables/nJmyz/src/DBFTables.jl:221
 [4] DBFTables.Table(io::IOBuffer)
   @ DBFTables ~/.julia/packages/DBFTables/nJmyz/src/DBFTables.jl:313
 [5] _read_shp_from_zipfile(zipfile::String)
   @ ShapefileZipFileExt ~/.julia/dev/Shapefile/ext/ShapefileZipFileExt.jl:16
 [6] Shapefile.Table(path::String)
   @ Shapefile ~/.julia/dev/Shapefile/src/table.jl:71
 [7] top-level scope
   @ REPL[34]:1

julia> feature = Shapefile.Table("/Users/anshul/downloads/not_ocean/not_ocean.shp")
Shapefile.Table{Union{Missing, Shapefile.Polygon}} with 179838 rows and the following 10 columns:

geometry, id, level, source, parent_id, sibling_id, area, FID, layer, path

file: https://drive.google.com/file/d/1_OfPkW0ZeQ2-lnlP-72Zm0-ulvDFzw84/view?usp=sharing

asinghvi17 avatar Sep 17 '24 21:09 asinghvi17