Open-EO / openeo-geotrellis-extensions

Java/Scala extensions for Geotrellis, for use with OpenEO GeoPySpark backend.
Apache License 2.0
5 stars 4 forks source link

SENTINEL1_GRD: support filtering by orbit number #339

Closed bossie closed 1 day ago

bossie commented 3 weeks ago

https://discuss.eodc.eu/t/sentinel-1-time-series-how-selecting-orbit-number/1004/2

Relevant feature properties are sat:absolute_orbit and sat:relative_orbit. At the moment they are propagated to the Catalog API; this works for sentinel-5p-l2/sat:absolute_orbit but not for sentinel-1-grd at all:

{
    "code": 400,
    "description": "Querying is not supported on property 'sat:absolute_orbit'. Possible properties are 'sar:instrument_mode', 's1:polarization', 'sat:orbit_state', 's1:resolution', 's1:timeliness'."
}

Instead, this will probably involve client-side filtering like we do for tileId.

jdries commented 2 weeks ago

Note that using 'relativeOrbitNumber' as filter property should work just fine on cdse. Isn't it better to just use that?

EmileSonneveld commented 2 weeks ago

Recommended this snippet:

url = "https://openeo.dataspace.copernicus.eu"
connection = openeo.connect(url).authenticate_oidc()

spatial_extent_tap = {"east": 5.08, "north": 51.22, "south": 51.215, "west": 5.07}

bbox_aoi = spatial_extent_tap
s1_cube = connection.load_collection(
    "SENTINEL1_GRD",
    temporal_extent=("2019-06-01", "2019-06-20"),
    spatial_extent=bbox_aoi,
    bands=['VH', 'VV'],
    properties=[
        openeo.collection_property("sat:orbit_state") == "ASCENDING",
        # options for this extent are 161 and 88
        openeo.collection_property("relativeOrbitNumber") == "161",
    ],
)

s1_cube = s1_cube.sar_backscatter(
    elevation_model="COPERNICUS_30",
    coefficient="sigma0-ellipsoid",
    options={"implementation_version": "2", "debug": True, "tile_size": 256},
)