opendatacube / datacube-explorer

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

Add dataset thumbnail #487

Closed Ariana-B closed 1 year ago

Ariana-B commented 1 year ago

Add image overlay to map if nbart thumbnail link is found.

Tested by running locally; seems to work as expected.

image


:books: Documentation preview :books:: https://datacube-explorer--487.org.readthedocs.build/en/487/

robbibt commented 1 year ago

This looks SO cool @Ariana-B, exactly what I had in mind!

One question/suggestion: I can see in the code that it appears to only plot the thumbnail if it's from an NBART product. Would it be possible to generalise this to plot thumbnails for any product if they're available? For example, we also have thumbnails for most of our other Collection 3 products, and it'd be fantastic to be able to visualise them too.

e.g. all of these (and more) have a "_thumbnail.jpg":

https://data.dea.ga.gov.au/?prefix=derivative/ga_ls_fc_3/2-5-1/092/076/2018/06/17/ https://data.dea.ga.gov.au/?prefix=derivative/ga_ls_mangrove_cover_cyear_3/3-0-0/x27/y44/2001--P1Y/ https://data.dea.ga.gov.au/?prefix=derivative/ga_ls_wo_fq_apr_oct_3/1-6-0/x32/y28/1998-04--P7M/ https://data.dea.ga.gov.au/?prefix=derivative/ga_ls_tc_pc_cyear_3/1-0-0/x27/y36/1991--P1Y/

omad commented 1 year ago

This is looking great Ariana. I was expecting it to require Python/Flask modifications as well as the template, hopefully the logic doesn't get too hairy by keeping it in the template with my next request.

The DEA ARD data include thumbnails under the nbart:thumbnail tag, but most datasets that include a thumbnail are simply thumbnail. Can you please update this to also show the thumbnail image for those types of datasets.

Eg.

Ariana-B commented 1 year ago

@omad @robbibt updated to include thumbnail tag

robbibt commented 1 year ago

Thanks @Ariana-B! Super looking forward to seeing this go live - can someone tag me when that happens so I can test it out?