opendatacube / datacube-explorer

Web-based exploration of Open Data Cube collections
Apache License 2.0
54 stars 31 forks source link

NCI local filesystem indexed thumbnails are inaccessible from web #520

Open jmettes opened 1 year ago

jmettes commented 1 year ago

image

https://explorer.dea.ga.gov.au/products/ga_ls9c_ard_3/datasets/abe45d2b-a54f-468d-98ea-2ffb30656260

Perhaps a wrapper can be written for NCI to handle these /g/data files and translate them to the corresponding THREDDS location? Not sure if the paths are always consistently 1:1 from /g/data and THREDDS, though. 🤷

NCI location file:///g/data/xu18/ga/ga_ls9c_ard_3/105/068/2022/10/06/ga_ls9c_nbart_3-2-1_105068_2022-10-06_final_thumbnail.jpg
THREDDS location https://dapds00.nci.org.au/thredds/fileServer/xu18/ga_ls9c_ard_3/105/068/2022/10/06/ga_ls9c_nbart_3-2-1_105068_2022-10-06_final_thumbnail.jpg
Catalog https://dapds00.nci.org.au/thredds/catalog/xu18/ga_ls9c_ard_3/105/068/2022/10/06/catalog.html

This seems to be at least possible in principle, because that seems to be done for AWS - mapping from S3://dea-public-data/... -> https://dea-public-data.s3.ap-southeast-2.amazonaws.com/... image

Perhaps, while we're at it we could replace the location link with the THREDDS ones too: image

Looks like it's handled here in the code: https://github.com/opendatacube/datacube-explorer/blob/e09884af0b398d30f4e4c4494f9a808146dbec95/cubedash/_utils.py#L148-L182

Ariana-B commented 1 year ago

@dunkgray thoughts?