Commit 2418d229 authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

find products

parent 024e0b27
This diff is collapsed.
...@@ -5,23 +5,25 @@ POLYGON=$2 #Crop Window ...@@ -5,23 +5,25 @@ POLYGON=$2 #Crop Window
BOX=$(polygonToBox.py "$POLYGON") BOX=$(polygonToBox.py "$POLYGON")
cd $DIR #cd $DIR
ls *.jp2 | parallel --jobs 4 gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -of JPEG {} {}_ #ls *.jp2 | parallel --jobs 4 gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -of JPEG {} {}_
DIRNAME=$(echo $DIR | cut -d"/" -f1) #DIRNAME=$(echo $DIR | cut -d"/" -f1)
echo $DIRNAME #echo $DIRNAME
if [ ! -e ../$DIRNAME"TCI_10m_cropedmerged.tif" ]; then #if [ ! -e ../$DIRNAME"TCI_10m_cropedmerged.tif" ]; then
echo "gdal_merge.py -o ../cropmerge/"$DIRNAME"TCI_10m_cropedmerged.tif" $(ls *TCI_10m.jp2_) # echo "gdal_merge.py -o ../cropmerge/"$DIRNAME"TCI_10m_cropedmerged.tif" $(ls *TCI_10m.jp2_)
gdal_merge.py -o ../cropmerge/$DIRNAME"TCI_10m_cropedmerged.tif" $(ls *TCI_10m.jp2_) # gdal_merge.py -o ../cropmerge/$DIRNAME"TCI_10m_cropedmerged.tif" $(ls *TCI_10m.jp2_)
else #else
echo PASSING ../cropmerge/$DIRNAME"TCI_10m_cropedmerged.tif" FOUND # echo PASSING ../cropmerge/$DIRNAME"TCI_10m_cropedmerged.tif" FOUND
fi #fi
cd .. #cd ..
##------------------------------------------------------------------------------ ##------------------------------------------------------------------------------
cd $DIR cd $DIR
DIRNAME=$(echo $DIR | cut -d"/" -f1)
echo $DIRNAME
if [ ! -e $DIRNAME"TCI_10m_merged.tif" ]; then if [ ! -e $DIRNAME"TCI_10m_merged.tif" ]; then
echo "gdal_merge.py -o "$DIRNAME"TCI_10m_merged.tif" $(ls *TCI_10m.jp2) echo "gdal_merge.py -o "$DIRNAME"TCI_10m_merged.tif" $(ls *TCI_10m.jp2)
gdal_merge.py -o $DIRNAME"TCI_10m_merged.tif" $(ls *TCI_10m.jp2) gdal_merge.py -o $DIRNAME"TCI_10m_merged.tif" $(ls *TCI_10m.jp2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment