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

KeyError: key "scale_factor" not found #39

Open
danlooo opened this issue Dec 12, 2024 · 3 comments
Open

KeyError: key "scale_factor" not found #39

danlooo opened this issue Dec 12, 2024 · 3 comments

Comments

@danlooo
Copy link
Collaborator

danlooo commented Dec 12, 2024

Existing required attribute scale_factor can not be read:

using RQADeforestation
c =  gdalcube(["/eodc/products/eodc.eu/S1_CSAR_IWGRDH/SIG0/V01R01/EQUI7_NA020M/E036N075T3/SIG0_20211013T052839__VH_A037_E036N075T3_NA020M_V01R01_S1BIWGRDH.tif"])

results in Error:

ERROR: KeyError: key "scale_factor" not found
Stacktrace:
 [1] getindex
   @ ./dict.jl:477 [inlined]
 [2] gdalcube(filenames::Vector{String})
   @ RQADeforestation ~/.julia/packages/RQADeforestation/g2bO1/src/auxil.jl:122
 [3] top-level scope
   @ REPL[4]:1

with Package status:

  [c7e460c6] ArgParse v1.2.0
⌅ [0703355e] DimensionalData v0.28.5
  [c27321d9] Glob v1.3.1
  [3f1d9318] RQADeforestation v1.0.0-DEV `https://github.com/EarthyScience/RQADeforestation.jl#a611912`
⌃ [c21b50f5] YAXArrays v0.5.13

despite available attribute

gdalinfo /eodc/products/eodc.eu/S1_CSAR_IWGRDH/SIG0/V01R01/EQUI7_NA020M/E036N075T3/SIG0_20211013T052839__VH_A037_E036N075T3_NA020M_V01R01_S1BIWGRDH.tif | grep scale_factor
  scale_factor=100
@danlooo
Copy link
Collaborator Author

danlooo commented Dec 12, 2024

Property scale_factor is applied in YAXArrayBase.jl. However, those properties are not propagated to YAXArray properties. Furthermore, YAXArrays::concatenatecubes will remove all properties, because they might not be meaningful any more after concatenation.

@felixcremer
Copy link
Collaborator

But I find the scale_factor in my examples and I am wondering why I didn't run into this error when I apply gdalcube.

@danlooo
Copy link
Collaborator Author

danlooo commented Dec 16, 2024

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