Skip to content

Commit fa2be0e

Browse files
jdriesPeter Van Bouwel
authored andcommitted
Open-EO#334 compute geometry bbox in target crs if possible
1 parent 6f09327 commit fa2be0e

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

tests/data/geojson/points.geojson

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"type": "FeatureCollection",
3+
"name": "points",
4+
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
5+
"xy_coordinate_resolution": 1e-09,
6+
"bbox": [ 3.091833765, 50.919789774, 10.975876619, 51.630646097 ],
7+
"features": [
8+
{ "type": "Feature", "properties": { }, "bbox": [ 10.975876619, 51.557944882, 10.975876619, 51.557944882 ], "geometry": { "type": "Point", "coordinates": [ 10.975876619, 51.557944882 ] } },
9+
{ "type": "Feature", "properties": { }, "bbox": [ 3.576508531, 50.919789774, 3.576508531, 50.919789774 ], "geometry": { "type": "Point", "coordinates": [ 3.576508531, 50.919789774 ] } },
10+
{ "type": "Feature", "properties": { }, "bbox": [ 3.091833765, 51.485243667, 3.091833765, 51.485243667 ], "geometry": { "type": "Point", "coordinates": [ 3.091833765, 51.485243667 ] } },
11+
{ "type": "Feature", "properties": { }, "bbox": [ 6.961153977, 51.630646097, 6.961153977, 51.630646097 ], "geometry": { "type": "Point", "coordinates": [ 6.961153977, 51.630646097 ] } },
12+
{ "type": "Feature", "properties": { }, "bbox": [ 10.959720794, 51.590256533, 10.959720794, 51.590256533 ], "geometry": { "type": "Point", "coordinates": [ 10.959720794, 51.590256533 ] } },
13+
{ "type": "Feature", "properties": { }, "bbox": [ 3.091833765, 51.566022795, 3.091833765, 51.566022795 ], "geometry": { "type": "Point", "coordinates": [ 3.091833765, 51.566022795 ] } }
14+
]
15+
}

tests/test_views_execute.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def test_reduce_bands_invalid_dimension(api):
560560

561561
def test_execute_mask(api):
562562
api.check_result("mask.json")
563-
assert dummy_backend.get_collection("S2_FAPAR_CLOUDCOVER").mask.call_count == 1
563+
assert dummy_backend.get_collection("ESA_WORLDCOVER_10M_2020_V1").mask.call_count == 1
564564

565565
expected_spatial_extent = {
566566
"west": 7.02,
@@ -2236,7 +2236,7 @@ def test_mask_with_vector_file(api):
22362236

22372237
def test_aggregate_feature_collection(api):
22382238
api.check_result("aggregate_feature_collection.json")
2239-
params = dummy_backend.last_load_collection_call('S2_FOOBAR')
2239+
params = dummy_backend.last_load_collection_call('ESA_WORLDCOVER_10M_2020_V1')
22402240
assert params["spatial_extent"] == {"west": 5, "south": 51, "east": 6, "north": 52, "crs": 'EPSG:4326'}
22412241

22422242

0 commit comments

Comments
 (0)