Proposed change: have stack_bands() return xarray.Dataset with common band names
- Dominant language
- Python
- Stars
- 113
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
@jsignell did some awesome work putting together the [`stack_bands()`](https://github.com/pangeo-data/intake-stac/blob/38a5ff1f3254e01bb4bd0ecb14e37a8b371f1cf0/intake_stac/catalog.py#L186) in https://github.com/pangeo-data/intake-stac/pull/19
I'd like to propose a few modifications (building off examples/planet_disaster_data.ipynb) and can follow up with a pull request:
1) Return common_name labels if they are used to select bands (notice 'B4' and 'B5') in DataArray
`landsat['LC80110312014230LGN00'].stack_bands(['red', 'nir']).to_dask()`
```
dask.array
Coordinates:
* y (y) float64 4.742e+06 4.742e+06 4.742e+06 ... 4.504e+06 4.504e+06
* x (x) float64 3.183e+05 3.183e+05 3.184e+05 ... 5.526e+05 5.526e+05
* band (band)
Dimensions: (x: 7811, y: 7941)
Coordinates:
* y (y) float64 4.742e+06 4.742e+06 4.742e+06 ... 4.504e+06 4.504e+06
* x (x) float64 3.183e+05 3.183e+05 3.184e+05 ... 5.526e+05 5.526e+05
Data variables:
red (y, x) uint16 dask.array
nir (y, x) uint16 dask.array
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.