Skip to content
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

Can't read GeoParquet with zstd compression #87

Open
asinghvi17 opened this issue Nov 13, 2024 · 3 comments
Open

Can't read GeoParquet with zstd compression #87

asinghvi17 opened this issue Nov 13, 2024 · 3 comments

Comments

@asinghvi17
Copy link
Contributor

MWE:

julia> using NaturalEarth, DataFrames, GeoParquet, GeoDataFrames

julia> all_countries = naturalearth("admin_0_countries", 10) |> DataFrame |> x -> select!(x, [:geometry, :ADM0_A3])
258×2 DataFrame
 Row │ geometry         ADM0_A3 
     │ Union           String  
─────┼──────────────────────────
   12D MultiPolygon  IDN
   22D MultiPolygon  MYS
   32D MultiPolygon  CHL
   42D Polygon       BOL
              
 2552D Polygon       ATC
 2562D Polygon       BJN
 2572D Polygon       SER
 2582D Polygon       SCR
                250 rows omitted

julia> GeoParquet.write("test.pq", all_countries, (:geometry,))
"test.pq"

julia> GeoDataFrames.read("test.pq")
ERROR: GDALError (CE_Failure, code 1):
        GetRecordBatchReader() failed: Support for codec 'zstd' not built

Stacktrace:
  [1] maybe_throw()
    @ GDAL ~/.julia/packages/GDAL/R5iZD/src/error.jl:42
  [2] aftercare
    @ ~/.julia/packages/GDAL/R5iZD/src/error.jl:59 [inlined]
  [3] ogr_l_getnextfeature
    @ ~/.julia/packages/GDAL/R5iZD/src/libgdal.jl:23217 [inlined]
  [4] iterate(layer::ArchGDAL.FeatureLayer, state::Int64)
    @ ArchGDAL ~/.julia/dev/ArchGDAL/src/base/iterators.jl:7
  [5] iterate
    @ ~/.julia/dev/ArchGDAL/src/base/iterators.jl:5 [inlined]
  [6] first
    @ ./abstractarray.jl:472 [inlined]
  [7] #15
    @ ~/.julia/dev/GeoDataFrames/src/io.jl:88 [inlined]
  [8] getlayer(::GeoDataFrames.var"#15#16"{ArchGDAL.Dataset}, ::ArchGDAL.Dataset, ::Vararg{Any}; kwargs::@Kwargs{})
    @ ArchGDAL ~/.julia/dev/ArchGDAL/src/context.jl:268
  [9] getlayer
    @ ~/.julia/dev/ArchGDAL/src/context.jl:265 [inlined]
 [10] read(ds::ArchGDAL.Dataset, layer::Int64)
    @ GeoDataFrames ~/.julia/dev/GeoDataFrames/src/io.jl:80
 [11] (::GeoDataFrames.var"#10#11")(ds::ArchGDAL.Dataset)
    @ GeoDataFrames ~/.julia/dev/GeoDataFrames/src/io.jl:62
 [12] read(f::GeoDataFrames.var"#10#11", args::String; kwargs::@Kwargs{})
    @ ArchGDAL ~/.julia/dev/ArchGDAL/src/context.jl:268
 [13] read
    @ ~/.julia/dev/ArchGDAL/src/context.jl:265 [inlined]
 [14] read(fn::String; kwargs::@Kwargs{})
    @ GeoDataFrames ~/.julia/dev/GeoDataFrames/src/io.jl:58
 [15] read(fn::String)
    @ GeoDataFrames ~/.julia/dev/GeoDataFrames/src/io.jl:52
 [16] top-level scope
    @ REPL[48]:1
@asinghvi17
Copy link
Contributor Author

Probably needs to be corrected in GDAL_jll, but want to keep track of this here.

@evetion
Copy link
Owner

evetion commented Nov 13, 2024

Yeah, I've hit the same error, because I use GeoParquet with ZSTD all the time.

@evetion
Copy link
Owner

evetion commented Nov 20, 2024

Should be fixed once we build GDAL with this JuliaPackaging/Yggdrasil#9801

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants