Skip to content

Commit f925ae5

Browse files
committed
Removed old, unused zonal_statistics stubs from openeo-python-driver
related to #114
1 parent 275b55a commit f925ae5

File tree

5 files changed

+0
-95
lines changed

5 files changed

+0
-95
lines changed

openeo_driver/ProcessGraphDeserializer.py

-6
Original file line numberDiff line numberDiff line change
@@ -1092,12 +1092,6 @@ def filter_bands(args: Dict, env: EvalEnv) -> DriverDataCube:
10921092
return cube.filter_bands(bands=bands)
10931093

10941094

1095-
# TODO deprecated process? also see https://github.com/Open-EO/openeo-python-client/issues/144
1096-
@deprecated_process
1097-
def zonal_statistics(args: Dict, env: EvalEnv) -> Dict:
1098-
raise ProcessUnsupportedException("The zonal_statistics process has been deprecated, and can no longer be used, use aggregate_spatial instead.")
1099-
1100-
11011095
@process
11021096
def apply_kernel(args: Dict, env: EvalEnv) -> DriverDataCube:
11031097
image_collection = extract_arg(args, 'data')

openeo_driver/datacube.py

-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ def aggregate_spatial(
114114
) -> Union["AggregatePolygonResult", "AggregatePolygonSpatialResult", "DriverVectorCube"]:
115115
self._not_implemented()
116116

117-
def zonal_statistics(self, regions, func:str) -> 'DriverDataCube':
118-
self._not_implemented()
119117

120118
def timeseries(self, x, y, srs="EPSG:4326") -> dict:
121119
# TODO #47: remove this non-standard process

openeo_driver/dry_run.py

-2
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,6 @@ def _normalize_geometry(self, geometries) -> Tuple[Union[DriverVectorCube, Delay
482482
def raster_to_vector(self):
483483
return AggregatePolygonResult(timeseries={}, regions=None)
484484

485-
def zonal_statistics(self, regions, func: str) -> Union[AggregatePolygonResult, AggregatePolygonSpatialResult]:
486-
return self.aggregate_spatial(geometries=regions, reducer=func)
487485

488486
def resample_cube_spatial(self, target: 'DryRunDataCube', method: str = 'near') -> 'DryRunDataCube':
489487
cube = self._process("process_type", [ProcessType.FOCAL_SPACE])

openeo_driver/dummy/dummy_backend.py

-5
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,6 @@ def save_result(self, filename: str, format: str, format_options: dict = None) -
197197
f.write("{f}:save_result({s!r}".format(f=format, s=self))
198198
return filename
199199

200-
def zonal_statistics(self, regions, func, scale=1000, interval="day")\
201-
-> Union['AggregatePolygonResult', 'AggregatePolygonSpatialResult']:
202-
# TODO: get rid of non-standard "zonal_statistics" (standard process is "aggregate_spatial")
203-
return self.aggregate_spatial(geometries=regions, reducer=func)
204-
205200
def aggregate_spatial(
206201
self,
207202
geometries: Union[BaseGeometry, str, DriverVectorCube],

tests/data/pg/0.4/no_nested_json_result.json

-80
This file was deleted.

0 commit comments

Comments
 (0)