Skip to content

Commit

Permalink
add a way to get band/property values
Browse files Browse the repository at this point in the history
  • Loading branch information
jdries committed Mar 14, 2024
1 parent b52bd26 commit 69bce92
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions openeo_driver/datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,13 @@ def get_cube(self) -> Optional[xarray.DataArray]:
def get_ids(self) -> Optional[Sequence]:
return self._geometries.get("id")

def get_band_values(self,key) -> Optional[Sequence]:
"""
TODO: is this now the DIM_PROPERTIES or DIM_BANDS?
Returns values for a specific band, other dimensions (e.g. time, geometry) are flattened.
"""
return self._geometries.get(key)

def get_xarray_cube_basics(self) -> Tuple[tuple, dict]:
"""Get initial dims/coords for xarray DataArray construction"""
dims = (self.DIM_GEOMETRY,)
Expand Down

0 comments on commit 69bce92

Please sign in to comment.