Skip to content

Commit

Permalink
Merge pull request #61 from NASA-IMPACT/dev
Browse files Browse the repository at this point in the history
Merge dev into master in preparation for new release.
  • Loading branch information
sharkinsspatial authored Oct 6, 2022
2 parents 2fb66ef + 126672e commit 4961002
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
RUN pip3 install wheel
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
RUN pip3 install libxml2-python3
RUN pip3 install git+https://github.com/NASA-IMPACT/hls-hdf_to_cog@v1.7
RUN pip3 install git+https://github.com/NASA-IMPACT/hls-hdf_to_cog@v2.1
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
Expand Down
15 changes: 8 additions & 7 deletions scripts/landsat-tile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set_output_names () {
nbar_angle="${workingdir}/L8ANGLE.${nbarbasename}.hdf"
angleoutputfinal="${workingdir}/${outputname}.ANGLE.hdf"
nbar_cfactor="${workingdir}/CFACTOR.${nbarbasename}.hdf"
griddedoutput="${workingdir}/GRIDDED.${outputbasename}.hdf"
griddedoutput="${workingdir}/gridded.hdf"
output_metadata="${workingdir}/${outputname}.cmr.xml"
output_stac_metadata="${workingdir}/${outputname}_stac.json"
output_thumbnail="${workingdir}/${outputname}.jpg"
Expand Down Expand Up @@ -101,6 +101,7 @@ done
ls "$workingdir"
if [[ -f "$nbar_input" ]] && [[ -f "$nbar_angle" ]] ; then
echo "Running NBAR"
# Copy intermediate gridded output for debugging analysis.
cp "$nbar_input" "$griddedoutput"
derive_l8nbar "$nbar_input" "$nbar_angle" "$nbar_cfactor"

Expand Down Expand Up @@ -153,11 +154,12 @@ if [[ -f "$nbar_input" ]] && [[ -f "$nbar_angle" ]] ; then
# Copy manifest to S3 to signal completion.
aws s3 cp "$manifest" "${bucket_key}/${manifest_name}" --profile gccprofile
else
echo "Create gridded debug COG"
hdf_to_cog "$griddedoutput" --output-dir "$workingdir" --product L30 --debug-mode
# Copy all intermediate files to debug bucket.
echo "Copy files to debug bucket"
timestamp=$(date +'%Y_%m_%d_%H_%M')
debug_bucket_key=s3://${debug_bucket}/${outputname}_${timestamp}
aws s3 cp "$workingdir" "$debug_bucket_key" --recursive --quiet
debug_bucket_key=s3://${debug_bucket}/${outputname}
aws s3 cp "$workingdir" "$debug_bucket_key" --recursive --quiet --acl public-read
fi

# Generate GIBS browse subtiles
Expand Down Expand Up @@ -192,9 +194,8 @@ if [[ -f "$nbar_input" ]] && [[ -f "$nbar_angle" ]] ; then
--profile gccprofile
else
# Copy all intermediate files to debug bucket.
timestamp=$(date +'%Y_%m_%d_%H_%M')
debug_bucket_key=s3://${debug_bucket}/${outputname}_${timestamp}
aws s3 cp "$gibs_id_dir" "$debug_bucket_key" --recursive --quiet
debug_bucket_key=s3://${debug_bucket}/${outputname}
aws s3 cp "$gibs_id_dir" "$debug_bucket_key" --recursive --quiet --acl public-read
fi
fi
done
Expand Down

0 comments on commit 4961002

Please sign in to comment.