Closed maximlamare closed 3 years ago
@maximlamare the problem seems to originate from the Sentinel Hub catalogue. We'll need to find the corresponding catalogue entry for 'LOTL2'.
@forman I asked around, and have been given the entries for the catalogue:
The ids are
landsat-ot-l1
andlandsat-ot-l2
The ids are
landsat-ot-l1
andlandsat-ot-l2
Great, I'll change that accordingly.
Hi @maximlamare, changes have been merged to the xcube-sh master, could you test it, please? :)
from xcube_sh.sentinelhub import SentinelHub
from xcube_sh.config import CubeConfig
from xcube_sh.cube import open_cube
SH = SentinelHub()
SH.api_url = ("https://services-uswest2.sentinel-hub.com")
dakar_bbox = [-17.554176,14.640112,-17.387367,14.792487]
cube_config = CubeConfig(dataset_name='LOTL1',
band_names=['B02', 'B03'],
bbox=dakar_bbox,
spatial_res=0.000089,
time_range=['2018-05-14', '2020-07-31'],
time_tolerance='30M')
cube = open_cube(cube_config,sentinel_hub=SH)
cube
@AliceBalfanz that's awesome!
Do I need to update something in my EOXHub? Because I'm getting this when I run the above:
ValueError: cannot find collection name for dataset name 'LOTL1'
Hi @maximlamare ,
if I understand correctly, we need to make a conda forge release which includes the changes and then ask EOX to make an update, otherwise you will not be able to use the new changes via the EOXhub.
Please correct, if I am wrong @dzelge
@maximlamare xcube-sh 0.8.0 will be released on Wednesday. If you are using the EOX NBs, you will have to wait for another xcube-sh docker image that will inlcude the 0.8.0. This will still take another one or two weeks from then. But you can checkout and install latest xcube-sh from sources. In your Juypter lab open a terminal then
$ conda activate xcube
$ git clone https://github.com/dcs4cop/xcube-sh.git
$ cd xcube-sh
$ python setup.py develop
$ python
Verify:
>>> from xcube_sh.version import version
>>> version
But you can checkout and install latest xcube-sh from sources. In your Juypter lab open a terminal then
No wait. In order to make that work, you'll also need to update xcube to latest version using same method.
Overview
In the context of the Africa Cube contest we need to give access to Landsat Collection-2 data (L1C and L2A) to participants. It would also be good for users to access these new datasets in EDC.
Current situation
In the current version of EDC, the collections are visible:
results in
However, the endpoint is different for Landsat-8 Collection 2:
services-uswest2.sentinel-hub.com
(see https://docs.sentinel-hub.com/api/latest/data/landsat-8-l2/#endpoint-locations).So out of the box, the following commands don't work:
If one changes the endpoint, then the band names can be listed:
results in:
Problem
When creating an xcube, for example:
We cannot open the cube with the normal endpoint:
The code above generates the following error:
ValueError: cannot find collection name for dataset name 'LOTL2'
.Now looking at the code, if we try to pass the
SentinelHub
object with the updatedapi_url
as an argument of theopen_cube
function:The above does not work either:
ValueError: cannot find collection name for dataset name 'LOTL2'
.Solution tried
The problem comes from the data missing from the metadata. I added the missing metadata to the file, see MR coming up.
There are elements missing to my MR, because of the differences in endpoints. With the current state, when I call the cube with the new endpoint (
https://services-uswest2.sentinel-hub.com
), this causes a failure in the catalog:SentinelHubError: 404 Client Error: Not Found for url: https://services-uswest2.sentinel-hub.com/api/v1/catalog/search
And of course, if I call the
cube
with the original endpoint, I getCollection not found
.Help needed
Can I get help to implement Landsat Collection 2 in time for the Africa contest (end of April)?