Issue - Unable to access HLS via xcube_sh module

Hello,

Thanks for fantastic products!!!

Attempts to access Harmonized Landsat Sentinel data via Python using xcube_sh module results in ValueError: cannot find collection name for dataset name 'HARMONIZED_LANDSAT_SENTINEL'

Can you please illuminate what I may have missed in terms of accessing the data? I would like to utilize the xcube approach.

Using xcube_sh v0.10.3

Output of results to first query end point if data is present, SH responds yes.

from xcube_sh.sentinelhub import SentinelHub

SH = SentinelHub()
SH.dataset_names


['MODIS',
 'S2L1C',
 'LOTL1',
 'LMSSL1',
 'S2L2A',
 'S1GRD',
 'LETML1',
 'HLS',
 'LTML2',
 'CUSTOM',
 'DEM',
 'S3SLSTR',
 'S5PL2',
 'S3OLCI',
 'LOTL2',
 'LETML2',
 'LTML1']```

SH.band_names(‘HLS’)

[‘WaterVapor’,
‘Blue’,
‘CoastalAerosol’,
‘ThermalInfrared1’,
‘ThermalInfrared2’,
‘Red’,
‘QA’,
‘RedEdge3’,
‘RedEdge2’,
‘SAA’,
‘Cirrus’,
‘RedEdge1’,
‘VAA’,
‘NIR_Broad’,
‘NIR_Narrow’,
‘SZA’,
‘VZA’,
‘Green’,
‘SWIR1’,
‘SWIR2’]


print(“Supported DataCollections:\n”)
for collection in DataCollection.get_available_collections():
print(collection)

Supported DataCollections:

DataCollection.SENTINEL2_L1C
DataCollection.SENTINEL2_L2A
DataCollection.SENTINEL1
DataCollection.SENTINEL1_IW
DataCollection.SENTINEL1_IW_ASC
DataCollection.SENTINEL1_IW_DES
DataCollection.SENTINEL1_EW
DataCollection.SENTINEL1_EW_ASC
DataCollection.SENTINEL1_EW_DES
DataCollection.SENTINEL1_EW_SH
DataCollection.SENTINEL1_EW_SH_ASC
DataCollection.SENTINEL1_EW_SH_DES
DataCollection.DEM
DataCollection.DEM_MAPZEN
DataCollection.DEM_COPERNICUS_30
DataCollection.DEM_COPERNICUS_90
DataCollection.MODIS
DataCollection.LANDSAT_MSS_L1
DataCollection.LANDSAT_TM_L1
DataCollection.LANDSAT_TM_L2
DataCollection.LANDSAT_ETM_L1
DataCollection.LANDSAT_ETM_L2
DataCollection.LANDSAT_OT_L1
DataCollection.LANDSAT_OT_L2
DataCollection.SENTINEL5P
DataCollection.SENTINEL3_OLCI
DataCollection.SENTINEL3_SLSTR
DataCollection.HARMONIZED_LANDSAT_SENTINEL


### Requesting data as I would for S2 L2A

harmonized data

band_names = [‘Blue’,
‘Green’,
‘Red’,
‘NIR_Narrow’,
‘SWIR1’,
‘SWIR2’]

cube_config = CubeConfig(dataset_name=‘HARMONIZED_LANDSAT_SENTINEL’,
band_names=band_names,
tile_size=[512, 512],
bbox=bbox,
crs = “http://www.opengis.net/def/crs/EPSG/0/4326”,
spatial_res=spatial_res,
time_range=[start_date, end_date],
time_tolerance=“30M”)

cube = open_cube(cube_config)


### Invalid dataset name

in SentinelHubChunkStore.get_time_ranges(self)
585 collection_name = self._METADATA.dataset_collection_name(
586 self._cube_config.dataset_name
587 )
588 if not collection_name:
→ 589 raise ValueError(f"cannot find collection"
590 f" name for dataset name"
591 f" {self._cube_config.dataset_name!r}")
592 datetime_format = “%Y-%m-%dT%H:%M:%SZ”
593 features = self._sentinel_hub.get_features(
594 collection_name=collection_name,
595 bbox=self._cube_config.bbox,
(…)
601 bad_request_ok=False
602 )

ValueError: cannot find collection name for dataset name ‘HARMONIZED_LANDSAT_SENTINEL’



Thanks for the help :smile: 

Richard

Hi Richard,

I can’t tell from your request but I think you cannot find the collection because you are probably using the default Sentinel Hub endpoint. Try changing the endpoint to: services-uswest2.sentinel-hub.com when running your requests for the HLS data collection.

There’s some examples of this here, unfortunately no xcube specific ones though.

Hope this helps you out!