Closed j08lue closed 1 week ago
@anayeaye we talked about thumbnails before and setting a public bucket that can serve thumbnail image files. Can we do that in MCP?
@smohiudd I'll give that a try today. It would be a nice to add the pngs from veda-config to our STAC collections as thumbnail assets to get this rolling
Also I'm curious what PC is doing here for their public assets https://planetarycomputer.microsoft.com/api/stac/v1/collections/io-lulc-9-class
"assets": {
"thumbnail": {
"href": "https://ai4edatasetspublicassets.blob.core.windows.net/assets/pc_thumbnails/io-lulc-9-class.png",
"title": "10m Annual Land Use Land Cover (9-class)",
"media_type": "image/png"
},
@smohiudd @amarouane-ABDELHAK I published a temporary collection to test.openveda.cloud with a thumbnail asset in the collection. The collection, s3 object, and distribution get policy are not a working solution but I think we can use the collection and object to test out an edge or cloudfront function.
Published test collection: A Thumbnail Test
in https://test.openveda.cloud/?.language=en (https://test.openveda.cloud/api/stac/collections/to-delete)
The collection has this thumbnail asset
"assets": {
"thumbnail": {
"href": "s3://veda-thumbnails/hls-events-ej--dataset-cover.png",
"type": "image/png"
}
},
This bucket is in MCP and is protected. I started a permissions policy that includes this git object action for the CF distribution
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::veda-test-stac-browser/*",
"Condition": {
"StringEquals": {
"AWS:SourceArn": "arn:aws:cloudfront::the-test-dist-id"
}
}
Thanks @anayeaye for getting this started!
We are doing some automation testing in mcp-test so here is the test collection with thumbnail asset for us to add when working on exposing thumbnails in s3 via cloudfront (if we need to recreate it).
I have also copied all of the dataset cover thumbnails (cp -r datasets/*-cover.(jpg|png) thumbs/
) in veda-config to s3://veda-thumbnails
(the same not public MCP bucket referenced above). There are only 30 so there will be duplicates for collections that belong to a multi-collection dashboard datset.
Currently looking into this....
This is exciting! Here is a preview of a collection with a thumbnail href using a test cloudfront for thumbnails. My vote for a persistent cloudfront that we can use for collection thumbnail hrefs is thumbnails.openveda.cloud
. If it is not tied to the routes of a particular instance we can manage it as a constant collection level asset href.
We need to request a new Hosted Zone thumbnails.openveda.cloud in MCP
Request to have thumbnails.openveda.cloud hosted zone created was submitted to MCP (IMPACT-VEDA account)
Route 53 was added to MCP. we have a working thumbnails URL use https://thumbnails.openveda.cloud/caldor-fire--dataset-cover.jpg To access s3://veda-thumbnails/caldor-fire--dataset-cover.jpg
We will track adding thumbnails in the following tickets:
Description
When you load our STAC into STAC Browser, the experience is pretty bare-bones.
Example
Planetary Computer shows how it can be done:
PI Objective
24.3 Objective 2: Publish STAC metadata into Production VEDA
Acceptance criteria
To catch up, we would need: