Skip to content

Commit 66cc9ff

Browse files
committed
extent crs should always be string
1 parent 46be389 commit 66cc9ff

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

openeo_driver/dry_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ def _normalize_geometry(self, geometries, target_crs=None) -> Tuple[Union[Driver
598598
if target_crs is not None:
599599
is_utm = target_crs == "AUTO:42001" or "Auto42001" in str(target_crs)
600600
if is_utm:
601-
target_crs = BoundingBox.from_wsen_tuple(geometries.get_bounding_box(),crs=geometries.get_crs()).best_utm()
601+
target_crs = f"EPSG:{BoundingBox.from_wsen_tuple(geometries.get_bounding_box(),crs=geometries.get_crs()).best_utm()}"
602602
else:
603603
target_crs = BoundingBox.normalize_crs(target_crs)
604604
bbox = geometries.buffer_points(distance=10).reproject(CRS.from_user_input( target_crs )).get_bounding_box()

tests/test_dry_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,14 +1023,14 @@ def test_resample_filter_spatial(dry_run_env, dry_run_tracer):
10231023
assert src == ("load_collection", ("S2_FOOBAR", ()))
10241024
geometries, = dry_run_tracer.get_geometries(operation="filter_spatial")
10251025
assert constraints == {
1026-
"spatial_extent": {'crs': 32631,
1026+
"spatial_extent": {'crs': "EPSG:32631",
10271027
'east': 1056748.2872412915,
10281028
'north': 552664.2968779367,
10291029
'south': 0.0,
10301030
'west': 166021.44308054057},
10311031
"filter_spatial": {"geometries": DummyVectorCube.from_geometry(shapely.geometry.shape(polygon))},
10321032
"resample": {"method": "near", "resolution": [0.25, 0.25], "target_crs": 4326},
1033-
"weak_spatial_extent": {'crs': 32631,
1033+
"weak_spatial_extent": {'crs': "EPSG:32631",
10341034
'east': 1056748.2872412915,
10351035
'north': 552664.2968779367,
10361036
'south': 0.0,

0 commit comments

Comments
 (0)