Commit 9b3a3ac7 authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

links

parent 971cc900
......@@ -10,13 +10,28 @@ ls *.jp2 | parallel gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -of
DIRNAME=$(echo $DIR | cut -d"/" -f1)
echo $DIRNAME
if [ ! -e ../$DIRNAME"TCI_10m_merged.tif" ]; then
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_)
if [ ! -e ../$DIRNAME"TCI_10m_cropedmerged.tif" ]; then
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_)
else
echo PASSING ../$DIRNAME".tif" FOUND
echo PASSING ../cropmerge/$DIRNAME"TCI_10m_cropedmerged.tif" FOUND
fi
cd ..
##------------------------------------------------------------------------------
cd $DIR
if [ ! -e $DIRNAME"TCI_10m_merged.tif" ]; then
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)
else
echo PASSING $DIRNAME"TCI_10m_merged.tif" FOUND
fi
gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -of JPEG $DIRNAME"TCI_10m_merged.tif" ../mergecrop/$DIRNAME"TCI_10m_mergedcroped.tif"
cd ..
# gdal_merge.py -o ../$DIRNAME".tif" $(ls *TCI_10m.jp2)
#if [ ! -e $dir".jp2" ]; then
......@@ -27,6 +42,6 @@ cd ..
#cd $DIR
#find . -name *.xml -type f -delete
find . -name *.xml -type f -delete
......@@ -11,6 +11,8 @@ if [ "$#" -le 1 ]; then
fi
cd $JP2DIR
mkdir mergecrop
mkdir cropmerge
ls -d */ | parallel -q --jobs $JOBS mergeImages.sh {} "$POLYGON"
......
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