From afc7bca6958e994f70d79723ca775a24c57cf8f4 Mon Sep 17 00:00:00 2001 From: sharkinsspatial Date: Tue, 9 Jul 2024 14:37:22 -0600 Subject: [PATCH] Include manifest for VI files for LPDAAC ingestion. --- Dockerfile | 2 +- scripts/landsat-tile.sh | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 55da153..28a3ab8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,7 +64,7 @@ RUN pip3 install wheel RUN pip3 install git+https://github.com/NASA-IMPACT/hls-browse_imagery@v1.7 RUN pip3 install libxml2-python3 RUN pip3 install git+https://github.com/NASA-IMPACT/hls-hdf_to_cog@v2.1 -RUN pip3 install git+https://github.com/NASA-IMPACT/hls-manifest@v2.0 +RUN pip3 install git+https://github.com/NASA-IMPACT/hls-manifest@v2.1 RUN pip3 install git+https://github.com/NASA-IMPACT/hls-cmr_stac@v1.7 RUN pip3 install git+https://github.com/NASA-IMPACT/hls-utilities@v1.6 RUN pip3 install git+https://github.com/NASA-IMPACT/hls-vi@v1.5 diff --git a/scripts/landsat-tile.sh b/scripts/landsat-tile.sh index 6eda565..cc4d52b 100755 --- a/scripts/landsat-tile.sh +++ b/scripts/landsat-tile.sh @@ -41,6 +41,7 @@ set_output_names () { outputbasename="T${mgrs}.${year}${day_of_year}T${hms}.${hlsversion}" nbarbasename="${mgrs}.${year}${day_of_year}.${hms}.${hlsversion}" outputname="HLS.L30.${outputbasename}" + vi_outputname="HLS-VI.L30.${outputbasename}" # The derive_l8nbar C code infers values from the input file name so this # formatting is necessary. This implicit name requirement is not documented # anywhere! @@ -212,13 +213,19 @@ echo "Generating VI files" vi_generate_indices -i "$workingdir" -o "$vidir" -s "$outputname" vi_generate_metadata -i "$workingdir" -o "$vidir" +echo "Generating VI manifest" +vi_manifest_name="${vi_outputname}.json" +vi_manifest="${vidir}/${vi_manifest_name}" +create_manifest "$vidir" "$vi_manifest" "$vi_bucket_key" "HLSL30_VI" \ + "$vi_outputname" "$jobid" false + if [ -z "$debug_bucket" ]; then aws s3 cp "$vidir" "$vi_bucket_key" --exclude "*" --include "*.tif" \ --include "*.xml" --include "*.jpg" --include "*_stac.json" \ --profile gccprofile --recursive # Copy manifest to S3 to signal completion. - # aws s3 cp "$manifest" "${bucket_key}/${manifest_name}" --profile gccprofile + aws s3 cp "$vi_manifest" "${vi_bucket_key}/${vi_manifest_name}" --profile gccprofile else # Copy all vi files to debug bucket. echo "Copy files to debug bucket"