I’m trying to load a set of Sentinel 2 over the whole Europe for a year (2018). What I’m trying to do is to calculate some vegetation indeces, so if I could display the footprint of the available imagery over a certain area, I could reduce my time span to include only a subset of the available images. Is it possible to display the footprint in a certain region within a certain time frame?
Furthermore, I would like to filter only images that are cloud-free. I’ve tried to reproduce the command from here Finding and loading data — openEO Python Client 0.14.0a1 documentation connection.load_collection(“SENTINEL2_L2A”,
…,
max_cloud_cover=80)
But I get the following error:
TypeError: load_collection() got an unexpected keyword argument ‘max_cloud_cover’
Hi @dileomargherita ,
it seems like the documentation needs updating. The property to use for cloud cover filtering is eo:cloud_cover can you try that?
Displaying the footprint is not directly supported by openEO, but it is a feature of the catalogs that we are based on. In the case of SENTINEL2_L2A, we in fact have the whole collection available.
There’s also multiple visual tools to retrieve this. One being the newly launched:
Ah wait, I made a mistake, the documentation was in fact correct, but can you check the version of your openEO python client?
It needs to be at least 0.13.0, and then the max_cloud_cover keyword should work.
You can normally use conda to update the openeo package in that environment to the latest version.
I guess it has not been updated after the latest release, right @benjamin.schumacher ?
The openeo Python Client is only available via PyPI, therefore please use pip to upgrade the package to the latest version using the following command.
Thank you @christoph.reimer , so I updated OpenEO to v. 0.13.0, which seems to be the latest available, and then as @jeroen.dries suggested, I tried again to apply the max_cloud_cover, but it still does not work.
/opt/conda/lib/python3.9/site-packages/openeo/rest/connection.py:980: UserWarning: SENTINEL2_L2A_SENTINELHUB property filtering with properties that are undefined in the collection metadata (summaries): eo:cloud_cover.
return DataCube.load_collection(
OpenEoApiError: [500] Internal: Failed to create job on backend 'sentinelhub': OpenEoApiError('[500] unknown: <!doctype html>\n<html lang=en>\n<title>500 Internal Server Error</title>\n<h1>Internal Server Error</h1>\n<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>\n') (ref: r-4856425504cb463eb7d5860b4b510c54)
@dileomargherita this solution works, which specifies to use the back-end from VITO and not the the one from SentinelHub (which currently returns the error showed in the previous message):
Hi all, it’s not completely relevant anymore to this discussion, but since this week the openeo python package is now also available in conda through the conda-forge channel: Openeo :: Anaconda.org
@daniel.thiex I am also trying a simple example but I am getting an error from the SentinelHub back-end:
Sorry, about the late reply, I somehow missed this. I am a bit confused why in your example our backend was used as the if nothing specified Vito’s should be used. Running it on our backend I get indeed the same cryptic error which is due to the fact we don’t support netCDF. If you replace the format with format=GTiff it works fine. Will see if we can improve the error message for such cases.