@@ -521,7 +521,7 @@ def vector_buffer(args: Dict, env: EvalEnv) -> dict:
521
521
input_crs = 'epsg:4326'
522
522
buffer_resolution = 3
523
523
524
- # TODO EP-3981 convert `geometry` to vector cube and move buffer logic to there
524
+ # TODO #114 EP-3981 convert `geometry` to vector cube and move buffer logic to there
525
525
if isinstance (geometry , str ):
526
526
# TODO: assumption here that `geometry` is a path/url
527
527
geoms = list (DelayedVector (geometry ).geometries )
@@ -664,7 +664,7 @@ def chunk_polygon(args: dict, env: EvalEnv) -> DriverDataCube:
664
664
data_cube = extract_arg (args , 'data' )
665
665
666
666
# Chunks parameter check.
667
- # TODO EP-3981 normalize first to vector cube and simplify logic
667
+ # TODO #114 EP-3981 normalize first to vector cube and simplify logic
668
668
if isinstance (chunks , DelayedVector ):
669
669
polygons = list (chunks .geometries )
670
670
for p in polygons :
@@ -705,7 +705,7 @@ def fit_class_random_forest(args: dict, env: EvalEnv) -> DriverMlModel:
705
705
706
706
predictors = extract_arg (args , 'predictors' )
707
707
if not isinstance (predictors , AggregatePolygonSpatialResult ):
708
- # TODO EP-3981 add support for real vector cubes.
708
+ # TODO #114 EP-3981 add support for real vector cubes.
709
709
raise ProcessParameterInvalidException (
710
710
parameter = "predictors" , process = "fit_class_random_forest" ,
711
711
reason = f"should be non-temporal vector-cube (got `{ type (predictors )} `)."
@@ -716,7 +716,7 @@ def fit_class_random_forest(args: dict, env: EvalEnv) -> DriverMlModel:
716
716
and target .get ("type" ) == "FeatureCollection"
717
717
and isinstance (target .get ("features" ), list )
718
718
):
719
- # TODO EP-3981 vector cube support
719
+ # TODO #114 EP-3981 vector cube support
720
720
raise ProcessParameterInvalidException (
721
721
parameter = "target" , process = "fit_class_random_forest" ,
722
722
reason = 'only GeoJSON FeatureCollection is currently supported.' ,
@@ -949,7 +949,7 @@ def aggregate_spatial(args: dict, env: EvalEnv) -> DriverDataCube:
949
949
target_dimension = args .get ('target_dimension' , None )
950
950
951
951
geoms = extract_arg (args , 'geometries' )
952
- # TODO: convert all cases to DriverVectorCube first and just work with that
952
+ # TODO #114 : convert all cases to DriverVectorCube first and just work with that
953
953
if isinstance (geoms , DriverVectorCube ):
954
954
geoms = geoms
955
955
elif isinstance (geoms , dict ):
@@ -993,11 +993,11 @@ def mask_polygon(args: dict, env: EvalEnv) -> DriverDataCube:
993
993
replacement = args .get ('replacement' , None )
994
994
inside = args .get ('inside' , False )
995
995
996
- # TODO: instead of if-elif-else chain: generically "cast" to VectorCube first (e.g. for wide input
996
+ # TODO #114 : instead of if-elif-else chain: generically "cast" to VectorCube first (e.g. for wide input
997
997
# support: GeoJSON, WKT, ...) and then convert to MultiPolygon?
998
998
if isinstance (mask , DelayedVector ):
999
999
# TODO: avoid reading DelayedVector twice due to dry-run?
1000
- # TODO EP-3981 embed DelayedVector in VectorCube implementation
1000
+ # TODO #114 EP-3981 embed DelayedVector in VectorCube implementation
1001
1001
polygon = shapely .ops .unary_union (list (mask .geometries ))
1002
1002
elif isinstance (mask , DriverVectorCube ):
1003
1003
polygon = mask .to_multipolygon ()
@@ -1073,7 +1073,7 @@ def filter_spatial(args: Dict, env: EvalEnv) -> DriverDataCube:
1073
1073
geometries = extract_arg (args , 'geometries' )
1074
1074
1075
1075
if not isinstance (geometries , dict ):
1076
- # TODO: support DelayedVector
1076
+ # TODO #114 : support DriverDataCube
1077
1077
raise NotImplementedError ("filter_spatial only supports dict but got {g!r}" .format (g = geometries ))
1078
1078
1079
1079
geometries = geojson_to_geometry (geometries )
@@ -1173,6 +1173,7 @@ def run_udf(args: dict, env: EvalEnv):
1173
1173
if dry_run_tracer and isinstance (data , AggregatePolygonResult ):
1174
1174
return JSONResult ({})
1175
1175
1176
+ # TODO #114 add support for DriverVectorCube
1176
1177
if isinstance (data , AggregatePolygonResult ):
1177
1178
pass
1178
1179
if isinstance (data , (DelayedVector , dict )):
@@ -1346,15 +1347,15 @@ def apply_process(process_id: str, args: dict, namespace: Union[str, None], env:
1346
1347
.returns ("TODO" , schema = {"type" : "object" , "subtype" : "vector-cube" })
1347
1348
)
1348
1349
def read_vector (args : Dict , env : EvalEnv ) -> DelayedVector :
1349
- # TODO EP-3981: deprecated in favor of load_uploaded_files/load_external? https://github.com/Open-EO/openeo-processes/issues/322
1350
+ # TODO #114 EP-3981: deprecated in favor of load_uploaded_files/load_external? https://github.com/Open-EO/openeo-processes/issues/322
1350
1351
path = extract_arg (args , 'filename' )
1351
1352
return DelayedVector (path )
1352
1353
1353
1354
1354
1355
@process_registry_100 .add_function (spec = read_spec ("openeo-processes/1.x/proposals/load_uploaded_files.json" ))
1355
1356
def load_uploaded_files (args : dict , env : EvalEnv ) -> DriverVectorCube :
1356
- # TODO EP-3981 process name is still under discussion https://github.com/Open-EO/openeo-processes/issues/322
1357
- # TODO EP-3981 also other return types: raster data cube, array, ...
1357
+ # TODO #114 EP-3981 process name is still under discussion https://github.com/Open-EO/openeo-processes/issues/322
1358
+ # TODO also other return types: raster data cube, array, ...
1358
1359
paths = extract_arg (args , 'paths' , process_id = "load_uploaded_files" )
1359
1360
format = extract_arg (args , 'format' , process_id = "load_uploaded_files" )
1360
1361
options = args .get ("options" , {})
@@ -1376,7 +1377,7 @@ def load_uploaded_files(args: dict, env: EvalEnv) -> DriverVectorCube:
1376
1377
.returns ("TODO" , schema = {"type" : "object" , "subtype" : "vector-cube" })
1377
1378
)
1378
1379
def get_geometries (args : Dict , env : EvalEnv ) -> Union [DelayedVector , dict ]:
1379
- # TODO: standardize or deprecate this? EP-3981 https://github.com/Open-EO/openeo-processes/issues/322
1380
+ # TODO: standardize or deprecate this? #114 EP-3981 https://github.com/Open-EO/openeo-processes/issues/322
1380
1381
feature_collection = args .get ('feature_collection' , None )
1381
1382
path = args .get ('filename' , None )
1382
1383
if path is not None :
0 commit comments