Commit ead86105 authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

links

parent 1b7b4383
...@@ -4,8 +4,8 @@ POLYGON=$2 #Crop Window ...@@ -4,8 +4,8 @@ POLYGON=$2 #Crop Window
BOX=$(polygonToBox.py "$POLYGON") BOX=$(polygonToBox.py "$POLYGON")
DIRNAME=$(echo $DIR | cut -d"/" -f1) #DIRNAME=$(echo $DIR | cut -d"/" -f1)
echo $DIRNAME #echo $DIRNAME
#if [ ! -e $DIRNAME".tif" ]; then #if [ ! -e $DIRNAME".tif" ]; then
# cd $DIR # cd $DIR
# echo "gdal_merge.py -o ../"$DIRNAME".tif" $(ls *TCI_10m.jp2) # echo "gdal_merge.py -o ../"$DIRNAME".tif" $(ls *TCI_10m.jp2)
...@@ -21,6 +21,18 @@ cd $DIR ...@@ -21,6 +21,18 @@ cd $DIR
ls *.jp2 | parallel gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -of JPEG {} {}_ ls *.jp2 | parallel gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -of JPEG {} {}_
cd .. cd ..
DIRNAME=$(echo $DIR | cut -d"/" -f1)
echo $DIRNAME
if [ ! -e $DIRNAME".tif" ]; then
cd $DIR
echo "gdal_merge.py -o ../"$DIRNAME".tif" $(ls *TCI_10m.jp2_)
gdal_merge.py -o ../$DIRNAME".tif" $(ls *TCI_10m.jp2_)
cd ..
else
# gdal_merge.py -o ../$DIRNAME".tif" $(ls *TCI_10m.jp2)
#if [ ! -e $dir".jp2" ]; then #if [ ! -e $dir".jp2" ]; then
# gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -of JPEG $dir".tif" $dir".jp2" # gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -of JPEG $dir".tif" $dir".jp2"
#fi #fi
......
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