ZGIS / semantique

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

fix: keep attrs during reduce :wrench: #51

Closed fkroeber closed 1 month ago

fkroeber commented 3 months ago

Description

This PR changes the default during reduce operations to keep_attrs=True. In particular, this means that spatial attributes (i.e. ‘spec’, ‘crs’, ‘transform’, ‘resolution’) are retained. In general, their omitting is not critical, as they can be reconstructed using the .rio methods. However, in cases where the arrays contain a spatial dimension with only one pixel width, it is essential to retain the spatial attributes since the spatial information cannot be reconstructed afterwards (-> see here).

Note that with the basic retention of the attributes, the spatial attributes are also retained for reduce-over-space operations. In my view, however, this is uncritical or even beneficial, as it retains an indication of the original spatial reference frame.

Type of change

Select one or more relevant options:

Checklist: