JuliaDataCubes / JuliaDataCubes/YAXArrays.jl

Can't open Netcdf file in QGIS when categorical axes is first dimension

Open
#42 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation triage
Dominant language
Julia
Stars
132
Forks
25
PR merge metrics
No merged PRs in 30d

Description

I have problems opening the result in QGIS, when I save the following cube as a netcdf:

YAXArray with the following dimensions
PeakStats           Axis with 2 elements: Min Max 
Y                   Axis with 5820 Elements from 561609.15 to 736179.15
X                   Axis with 7500 Elements from 9.48724066e6 to 9.26227066e6
Total size: 333.02 MB

The save works and it also has values in it, because I can reload it correctly with YAXArrays, but when I try to open it in QGIS, it can't be displayed, because QGIS tries to open the X axis as band information. The same happens with ncview.

I am not sure, whether this is an issue in YAXArray or whether this is a limitation of QGIS, but at least we should document it.
I can mitigate the problem by permuting the dimensions, so that Y is the first and X is the second axis. And I think, that it would be good, when the axes would be permuted automatically while writing the netcdf file

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Reproduce the reported YAXArray-to-NetCDF save with the categorical PeakStats axis first, then compare how QGIS and ncview handle the file when Y and X are first. Done should clarify whether YAXArrays needs automatic dimension permutation or whether the limitation should only be documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.