Skip to content

Commit 69bce92

Browse files
committed
add a way to get band/property values
Open-EO/openeo-geopyspark-driver#722
1 parent b52bd26 commit 69bce92

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

openeo_driver/datacube.py

+7
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,13 @@ def get_cube(self) -> Optional[xarray.DataArray]:
652652
def get_ids(self) -> Optional[Sequence]:
653653
return self._geometries.get("id")
654654

655+
def get_band_values(self,key) -> Optional[Sequence]:
656+
"""
657+
TODO: is this now the DIM_PROPERTIES or DIM_BANDS?
658+
Returns values for a specific band, other dimensions (e.g. time, geometry) are flattened.
659+
"""
660+
return self._geometries.get(key)
661+
655662
def get_xarray_cube_basics(self) -> Tuple[tuple, dict]:
656663
"""Get initial dims/coords for xarray DataArray construction"""
657664
dims = (self.DIM_GEOMETRY,)

0 commit comments

Comments
 (0)