i’m new to Sentinel Hub and I’m trying to create a data cube with data from Landsat8 on EDC using xcube as such:
cube_config = CubeConfig(dataset_name=‘LANDSAT_OT_L2’,
cube = open_cube(cube_config, **sh_credentials)
data = cube[‘B10’].data
but I get the following error :
Could you tell me what I’m doing wrong or indicate another way of doing it ?
Thanks in advance
As you are requesting Landsat 8 and 9 Level 2 data collections, it’s important to specify
API URL endpoint as it is different than the default setting in this case.
In addition, the dataset_name needs to be updated as the name specified by you does not exist. The method to list the dataset names you can used is:
SH = SentinelHub()
This will return the list of data collection names that are supported by the xcube-sh plugin.
You can then configure your datacube like below:
bbox = (11.15, 46.7, 11.2, 46.75)
cube_config = CubeConfig(dataset_name="LOTL2",
and then open it like this:
# Open cube (on the fly)
cube = open_cube(cube_config, api_url="https://services-uswest2.sentinel-hub.com")
# Display contents
Note how I have added the
api_url parameter to the
open_cube function. Doing this should successfully configure and then open the datacube.
In addition, we will ensure we update the documentation to include the dataset names for each collection to use with xcube as this is currently not too clear.
If you have any additional issues, please let us know and we will help solve them with you!
Thank you so much, it’s much clearer !