opendatacube / datacube-core

Open Data Cube analyses continental scale Earth Observation data through time
http://www.opendatacube.org
Apache License 2.0
505 stars 176 forks source link

Need a group by nothing option #615

Closed emmaai closed 1 year ago

emmaai commented 5 years ago

Expected behaviour

Need the option of group_by=None, by which datacube will return all the data available with the exactly same time and geo location rather than overwriting one another.

Actual behaviour

The data with the same time and geo-location will be overwritten if they are overlapping.

Kirill888 commented 5 years ago

The default behaviour is to group "by time", which will place Datasets with exactly the same timestamp into common pixel plane. While this is a reasonable default that avoids duplicate time entries it is sometimes inconvenient.

Sometimes we need to have more complex "fusing" logic than what current fuser interface allows to implement. For example using "masking bands". In these situations having time slice with duplicate timestamps is preferable, as we really need to avoid any fusing to be done by load.

While grouping is still along the "time" axis (does it even makes sense to group by any other dimension, and how this would look?), the actual grouping logic that is needed here is "to not group at all, but rather keep every dataset separate".

I would not use None to indicate that (as None usually means "default"), it's more like "fake" grouping along time dimension.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

omad commented 1 year ago

The group_by API needs some attention, hopefully in v2, which should enable this use-case.

However, since this particular ticket has had no updates in 4+ years, and can be implemented fairly trivally using xarray to load the individual files, I'm going to close.