Spatial extent different SRS

Hello,
Is it possible to define the spatial extent with different SRS ?
For example:
dc = connection.load_collection(
“SENTINEL2_L2A”,
spatial_extent={“west”: 2.15, “south”: 42.15, “east”: 2.4, “north”: 42.4},
temporal_extent=[“2019-01-01”, “2019-01-31”],
bands=[“B04”, “B08”,“SCL”],
)
Instead of spatial_extent={“west”: 2.15, “south”: 42.15, “east”: 2.4, “north”: 42.4},
I tried to use
spatial_extent = {“west”: 429770, “east”: 433953, “south”: 4666780, “north”: 4672292, ‘crs’: ‘epsg:32631’},

But I’ve got an error:
ype": “ExceptionReport”,
“exceptions”: [
{
“type”: “Exception”,
“exceptionCode”: “http://www.opengis.net/ows/2.0#InvalidParameterValue”,
“exceptionText”: “Invalid longitude 429770.0; must be between -180 and 180”,
“locator”: “bbox parameter”
}

Thank you
Imma

Hi,
looks like it should almost work. Can you try providing the epsg code as an integer?
So:
spatial_extent = {“west”: 429770, “east”: 433953, “south”: 4666780, “north”: 4672292, ‘crs’: 32631},

If that doesn’t work, could you send us the request id or batch job id if that gets printed? (The OWS exception report you get does not look entirely familiar for me, so not sure where that’s coming from.)

You indeed hit a bug, which you can workaround for now by using the SENTINEL2_L2A_SENTINELHUB collection (which is equivalent for your use case):

cube =  con.load_collection(
    "SENTINEL2_L2A_SENTINELHUB",
    spatial_extent = {
        "west": 429770, "east": 433953, "south": 4666780, "north": 4672292, 
        "crs": "epsg:32631",
    },
    ...

bug ticket: https://github.com/Open-EO/openeo-python-driver/issues/143

Somewhat related issue for the processes: EPSG code as string · Issue #391 · Open-EO/openeo-processes · GitHub

Sorry I couldn’t reply earlier, I tested, i got the error reported in the bug ticket.

Thank for your help

Thank you Stefaan, I use this collection.