ZGIS / semantique

Semantic Querying in Earth Observation Data Cubes
https://zgis.github.io/semantique/
Apache License 2.0
16 stars 6 forks source link

Store and preserve additional metadata in loaded arrays #13

Open luukvdmeer opened 2 years ago

luukvdmeer commented 2 years ago

Description

Currently the CRS of the spatial coordinates and the timezone of the temporal coordinates are stored in a DataArray object retrieved from a factbase. To prevent that this information gets lost when applying operations to the array, they are stored as non-dimension coordinates rather than as array attributes. Such coordinates always "survive" any operation applied to the array, while xarray may drop attributes.

Besides the CRS and the timezone there might be additional metadata that we want to attach to the DataArray and preserve during operations. An example is the copyright notice, see https://github.com/whisperingpixel/iq-inferenceengine/issues/123. This should be implemented in a flexible/tunable way (i.e. not hardcoded), e.g. by listing those metadata keys as configuration parameter of a factbase instance. When the metadata key is not present, data loading should still work (maybe with a warning?).

Additional context

Add any other context or screenshots about the feature request here.