Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! Issue #114/#141 convert inline Geo…
Browse files Browse the repository at this point in the history
…JSON in aggregate_spatial to VectorCube
  • Loading branch information
soxofaan committed Oct 7, 2022
1 parent bce577b commit 73ae035
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openeo_driver/ProcessGraphDeserializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,9 @@ def run_udf(args: dict, env: EvalEnv):
if isinstance(data, AggregatePolygonResult):
pass
if isinstance(data, DriverVectorCube):
# TODO: this is temporary adaption to old style save results. Better have proper DriverVectorCube support in run_udf?
# TODO: this is temporary stopgap measure, converting to old-style save results to stay backward compatible.
# Better have proper DriverVectorCube support in run_udf?
# How does that fit in UdfData and UDF function signatures?
data = data.to_legacy_save_result()

if isinstance(data, (DelayedVector, dict)):
Expand Down
1 change: 1 addition & 0 deletions openeo_driver/dummy/dummy_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ def assert_polygon_sequence(geometries: Union[Sequence, BaseMultipartGeometry])
coords[self.metadata.band_dimension.name] = self.metadata.band_names
shape = [len(coords[d]) for d in dims]
data = numpy.arange(numpy.prod(shape), dtype="float")
# Start with some more interesting values (e.g. to test NaN/null/None handling)
data[0] = 2.345
data[1] = float("nan")
cube = xarray.DataArray(
Expand Down

0 comments on commit 73ae035

Please sign in to comment.