Skip to content

Can't save subset data to tif #37

@felixcremer

Description

@felixcremer

I am trying to save a small data cube that is a subset of a larger tif to a new tif and I get the following error:
The data itself has a X and Y dimension but it seems that the dimnames are reversed in the YAB.create_dataset function for some reason.
This is based on the EODC Sentinel-1 data.

julia>     savecube(s, filename, overwrite=true)
ERROR: Did not find x, y or lon, lat dimensions in dataset
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] 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{})
   @ ArchGDALExt ~/.julia/packages/YAXArrayBase/M48vP/ext/ArchGDALExt/archgdaldataset.jl:174
 [3] create_dataset(::Type{…}, outpath::String, gatts::Dict{…}, dimnames::Vector{…}, dimvals::Vector{…}, dimattrs::Vector{…}, vartypes::Vector{…}, varnames::Vector{…}, vardims::Vector{…}, varattrs::Vector{…}, varchunks::Vector{…})
   @ ArchGDALExt ~/.julia/packages/YAXArrayBase/M48vP/ext/ArchGDALExt/archgdaldataset.jl:140
 [4] 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 /mnt/felix1/worldmap/dev/YAXArrays/src/DatasetAPI/Datasets.jl:687
 [5] savedataset
   @ /mnt/felix1/worldmap/dev/YAXArrays/src/DatasetAPI/Datasets.jl:637 [inlined]
 [6] 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 /mnt/felix1/worldmap/dev/YAXArrays/src/DatasetAPI/Datasets.jl:753
 [7] top-level scope
   @ REPL[94]:1
Some type information was truncated. Use `show(err)` to see complete types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions