Skip to content

Commit

Permalink
fixup! fixup! PR #200 finetune VectorCube.apply_dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Aug 1, 2023
1 parent 26c7c1a commit 329a4ce
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions openeo_driver/datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,12 @@ def apply_dimension(
if single_run_udf:
# Process with single "run_udf" node
if self._cube is None and dimension == self.DIM_GEOMETRIES and target_dimension is None:
log.warning(
f"Using experimental feature: DriverVectorCube.apply_dimension along dim {dimension} and empty cube"
)
# TODO: this is non-standard special case: vector cube with only geometries, but no "cube" data
feature_collection = openeo.udf.FeatureCollection(id="_", data=self._as_geopandas_df())
gdf = self._as_geopandas_df()
feature_collection = openeo.udf.FeatureCollection(id="_", data=gdf)
udf_data = openeo.udf.UdfData(
proj={"EPSG": self._geometries.crs.to_epsg()},
feature_collection_list=[feature_collection],
Expand All @@ -537,8 +541,7 @@ def apply_dimension(
return DriverVectorCube(geometries=result_features[0].data)
raise ValueError(f"Could not handle UDF result: {result_data}")

else:
raise FeatureUnsupportedException()
raise FeatureUnsupportedException()



Expand Down

0 comments on commit 329a4ce

Please sign in to comment.