Skip to content

Commit 329a4ce

Browse files
committed
fixup! fixup! PR #200 finetune VectorCube.apply_dimension
1 parent 26c7c1a commit 329a4ce

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

openeo_driver/datacube.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,12 @@ def apply_dimension(
520520
if single_run_udf:
521521
# Process with single "run_udf" node
522522
if self._cube is None and dimension == self.DIM_GEOMETRIES and target_dimension is None:
523+
log.warning(
524+
f"Using experimental feature: DriverVectorCube.apply_dimension along dim {dimension} and empty cube"
525+
)
523526
# TODO: this is non-standard special case: vector cube with only geometries, but no "cube" data
524-
feature_collection = openeo.udf.FeatureCollection(id="_", data=self._as_geopandas_df())
527+
gdf = self._as_geopandas_df()
528+
feature_collection = openeo.udf.FeatureCollection(id="_", data=gdf)
525529
udf_data = openeo.udf.UdfData(
526530
proj={"EPSG": self._geometries.crs.to_epsg()},
527531
feature_collection_list=[feature_collection],
@@ -537,8 +541,7 @@ def apply_dimension(
537541
return DriverVectorCube(geometries=result_features[0].data)
538542
raise ValueError(f"Could not handle UDF result: {result_data}")
539543

540-
else:
541-
raise FeatureUnsupportedException()
544+
raise FeatureUnsupportedException()
542545

543546

544547

0 commit comments

Comments
 (0)