There are 10 granules at <= 5% cloud cover There are 7 granules at 0% cloud cover
I chose the 10 granules at <= 5% cloud cover to download. Here is my search query url
- Use step1_download_hls.sh to download all the granules. This will download all the files into the directory you run the script from. This script is a copy/paste from the EarthData website.
- Next, use step2_organize_granules.py to place all of the downloaded granules into a directory structure that is easier to work with. Each directory is unique based on the granule and the date.
After running step2_organize_granules.py, your directory should look like this*
- The current version puts all the granules into a 'granules' directory
sh step3_mosaic_granule_bands.sh
This will mosaic all the bands for each granule into a single file. The output will be in the same directory as the granule. The output file will be named '<granule_name>_mosaic.tif'
Let's check to make sure the mosaics look good. We can use gdalinfo to check the metadata of the mosaic.
gdalinfo granules/<granule_name>/<granuel_name>_mosaic.tif
> Band 1
> Band 2
> Band 3
> Band N
docker buildx build --platform linux/amd64 -t ${USERNAME}/ukraine_e2e_app_amd64:july28 .
# Or this command for Arm architecture (No support on Bacalhau as of Aug 2023)
# docker buildx build --platform linux/arm64 -t jsolly/ukraine_e2e_app:arm .
docker run --rm ${USERNAME}/ukraine_e2e_app_amd64:july28 # There is already a sample image in the container
docker login
docker push ${USERNAME}/ukraine_e2e_app_amd64:july28
Here is the input mosaic T35UPQ_2022080_true_color_mosaic_uint8.tif -> QmSvTaRZmJJNnrj4jPfpTY5PHpTkMztHqXipoc23FNqwFG
#install bacalhau cli
curl -sL https://get.bacalhau.org/install.sh | bash
docker login
docker buildx build --platform linux/amd64 -t {USERNAME}/ukraine_e2e_app_amd64 .
docker push ${USERNAME}/ukraine_e2e_app_amd64:july28
# ensure the mosaic is on IPFS
ipfs dht findprovs QmSvTaRZmJJNnrj4jPfpTY5PHpTkMztHqXipoc23FNqwFG # Check to make sure the mosaic is on IPFS. This should return a list of peers
bacalhau docker run --timeout 10800 --gpu 1 --input ipfs://QmSvTaRZmJJNnrj4jPfpTY5PHpTkMztHqXipoc23FNqwFG:/T35UPQ_2022080_true_color_mosaic_uint8.tif jsolly/ukraine_e2e_app_amd64:july28
Work in progress