Skip to content

Commit

Permalink
PR #200 default to using "properties" dim name
Browse files Browse the repository at this point in the history
aligns better with load_geojson spec
  • Loading branch information
soxofaan committed Aug 3, 2023
1 parent 090efca commit 4c0d4c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openeo_driver/datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ class DriverVectorCube:
"""
DIM_GEOMETRIES = "geometries"
DIM_BANDS = "bands"
DIM_PROPERTIES = "properties"
FLATTEN_PREFIX = "vc"
COLUMN_SELECTION_ALL = "all"
COLUMN_SELECTION_NUMERICAL = "numerical"
Expand Down Expand Up @@ -254,8 +255,7 @@ def from_geodataframe(
data: gpd.GeoDataFrame,
*,
columns_for_cube: Union[List[str], str] = COLUMN_SELECTION_NUMERICAL,
# TODO: change default band name to "properties" (per `load_geojson` spec introduced by https://github.com/Open-EO/openeo-processes/pull/427)
dimension_name: str = DIM_BANDS,
dimension_name: str = DIM_PROPERTIES,
) -> "DriverVectorCube":
"""
Build a DriverVectorCube from given GeoPandas data frame,
Expand Down Expand Up @@ -600,7 +600,7 @@ def apply_dimension(

if single_run_udf:
# Process with single "run_udf" node
if dimension == self.DIM_BANDS and target_dimension is None:
if dimension in (self.DIM_BANDS, self.DIM_PROPERTIES) and target_dimension is None:
log.warning(
f"Using experimental feature: DriverVectorCube.apply_dimension along dim {dimension} and empty cube"
)
Expand Down

0 comments on commit 4c0d4c6

Please sign in to comment.