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

Cannot save WorldClim Elevation data to .tif #409

Open
felixcremer opened this issue Jun 27, 2024 · 0 comments
Open

Cannot save WorldClim Elevation data to .tif #409

felixcremer opened this issue Jun 27, 2024 · 0 comments
Labels
question Further information is requested

Comments

@felixcremer
Copy link
Member

When I try to use savecube to resave the WorldClim elevation to tif I get the following error:

using YAXArrays
using RasterDataSources
elevpath = getraster(WorldClim{Elevation},:elev, res="30s")
elev = Cube(elevpath)
zarrpath = tempname() * ".zarr"
julia> savecube(elev, zarrpath)
ERROR: Could not determine output projection from attributes, please specify userproj
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] getproj(::Nothing, attrs::Dict{String, Any})
   @ YAXArrayBase ~/.julia/packages/YAXArrayBase/R6Frw/src/datasets/archgdal.jl:127
 [3] create_dataset(::Type{…}, outpath::String, gatts::Dict{…}, dimnames::Vector{…}, dimvals::Vector{…}, dimattrs::Vector{…}, vartypes::Vector{…}, varnames::Vector{…}, vardims::Vector{…}, varattrs::Vector{…}, varchunks::Vector{…}; userproj::Nothing, kwargs::@Kwargs{})
   @ YAXArrayBase ~/.julia/packages/YAXArrayBase/R6Frw/src/datasets/archgdal.jl:157
 [4] create_dataset(::Type{…}, outpath::String, gatts::Dict{…}, dimnames::Vector{…}, dimvals::Vector{…}, dimattrs::Vector{…}, vartypes::Vector{…}, varnames::Vector{…}, vardims::Vector{…}, varattrs::Vector{…}, varchunks::Vector{…})
   @ YAXArrayBase ~/.julia/packages/YAXArrayBase/R6Frw/src/datasets/archgdal.jl:134
 [5] savedataset(ds::Dataset; path::String, persist::Nothing, overwrite::Bool, append::Bool, skeleton::Bool, backend::Symbol, driver::Symbol, max_cache::Float64, writefac::Float64, kwargs::@Kwargs{})
   @ YAXArrays.Datasets ~/.julia/packages/YAXArrays/zyFvF/src/DatasetAPI/Datasets.jl:571
 [6] savedataset
   @ ~/.julia/packages/YAXArrays/zyFvF/src/DatasetAPI/Datasets.jl:521 [inlined]
 [7] savecube(c::YAXArray{…}, path::String; layername::String, datasetaxis::String, max_cache::Float64, backend::Symbol, driver::Symbol, chunks::Nothing, overwrite::Bool, append::Bool, skeleton::Bool, writefac::Float64, kwargs::@Kwargs{})
   @ YAXArrays.Datasets ~/.julia/packages/YAXArrays/zyFvF/src/DatasetAPI/Datasets.jl:637
 [8] savecube(c::YAXArray{Union{…}, 2, DiskArrayTools.CFDiskArray{…}, Tuple{…}, Dict{…}}, path::String)
   @ YAXArrays.Datasets ~/.julia/packages/YAXArrays/zyFvF/src/DatasetAPI/Datasets.jl:617
 [9] top-level scope
   @ REPL[75]:1
Some type information was truncated. Use `show(err)` to see complete types.
@lazarusA lazarusA added the question Further information is requested label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants