Open Data Cube USGS Datasets – Indexing USGS Surface Temperature Datasets into Open Data Cube

open-data-cube

I have recently indexed USGS surface reflectance products in my local ODC, with help from @Alex except for Landsat 9 datasets. Now I am trying to index the surface temperature product and compiled a new product definition extracting information from the DEAfrica surface temperature products. However, I am getting the following error when trying to index using stac-to-dc and getting a similar error for the LS9 surface reflectance product.

command used:

stac-to-dc --catalog-href=https://landsatlook.usgs.gov/stac-server/ --rewrite-assets=https://landsatlook.usgs.gov/data/,s3://usgs-landsat/ --bbox=-42.679,-19.709,-42.059,-18.982 --collections=landsat-c2l2-st --datetime=2013-01-01/2022-02-25

Surface Temperature error:

02/28/2022 10:39:29: ERROR: Failed to handle item 

LC08_L2SP_217074_20131005_20200913_02_T1_ST with exception Failed to create dataset with error No matching Product found for dataset 3f1372fd-0068-5a7b-ab4e-922a38d48d02
 The URI was https://landsatlook.usgs.gov/stac-server/collections/landsat-c2l2-st/items/LC08_L2SP_217074_20131005_20200913_02_T1_ST
Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/site-packages/odc/apps/dc_tools/stac_api_to_dc.py", line 159, in stac_api_to_odc
    _ = future.result()
  File "/opt/conda/lib/python3.9/concurrent/futures/_base.py", line 438, in result
    return self.__get_result()
  File "/opt/conda/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
    raise self._exception
  File "/opt/conda/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/conda/lib/python3.9/site-packages/odc/apps/dc_tools/stac_api_to_dc.py", line 107, in process_item
    index_update_dataset(
  File "/opt/conda/lib/python3.9/site-packages/odc/apps/dc_tools/utils.py", line 179, in index_update_dataset
    raise IndexingException(
odc.apps.dc_tools.utils.IndexingException: Failed to create dataset with error No matching Product found for dataset 3f1372fd-0068-5a7b-ab4e-922a38d48d02
 The URI was https://landsatlook.usgs.gov/stac-server/collections/landsat-c2l2-st/items/LC08_L2SP_217074_20131005_20200913_02_T1_ST

In the product definition, I tried replacing B6 and B10 measurements with lwir and lwir11 respectively, still no luck!

From the error message, it's difficult to debug what went wrong in stac-to-dc. Any thoughts!

Best Answer

I failed to index surface temperature datasets and Landsat9 surface reflectance products from USGS, due to an incomplete method (_get_usgs_product_name) in _stac.py which is installed as part of odc_apps_dc_tools. I believe these functionalities are still under active development; hence, the issue. I have locally changed this file and managed to index all the products.