Unexpected use of GroupBy's sort_key
to label output dimensions when applying custom grouping
#1153
Labels
sort_key
to label output dimensions when applying custom grouping
#1153
Expected behaviour
I would like to use a custom
GroupBy
object to specify custom sorting when grouping data. For example, when loading datasets from multiple annual geomedian products, I would like datasets to be sorted by Landsat platform (e.g.LANDSAT-5
,LANDSAT-7
,LANDSAT-8
) when data is grouped so that I can prioritise data from one satellite over the other.For example, in this example I would like to create a
GroupBy
that uses a customsort_by_platform
function to prioritise data by alphabeticalplatform
order:I expect to be able to use this custom
GroupBy
to load data with a normal time dimension, with the only difference being the internal sorting used when combining datasets.Actual behaviour
When I supply this custom
GroupBy
todc.load
, the output of my custom sorting function now replaces thetime
dimension in my dataset:It is not possible to specify a custom sorting without the output of this function being used to rename the
time
dimension.This coupling of axis value from group sorted order appears to have been previously flagged in the following to-do: https://github.com/opendatacube/datacube-core/blob/develop/datacube/api/core.py#L464
Steps to reproduce the behaviour
Environment information
datacube --version
are you using? '1.8.4.dev81+g80d466a2'The text was updated successfully, but these errors were encountered: