Commit 96fd51ff authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

rgb

parent 5623d4d6
...@@ -3,7 +3,7 @@ PRODCUTSDIR=$1 #Products directory ...@@ -3,7 +3,7 @@ PRODCUTSDIR=$1 #Products directory
JP2DIR=$2 #JP2 Directory JP2DIR=$2 #JP2 Directory
POLYGON=$3 #Crop Window POLYGON=$3 #Crop Window
#BOX=$(python3 $HOME/GeoSentinel/geosentinel/polygonToBox.py "$POLYGON") BOX=$(python3 $HOME/GeoSentinel/geosentinel/polygonToBox.py "$POLYGON")
cd $PRODCUTSDIR cd $PRODCUTSDIR
for f in $(find . -type f -name '*.zip') for f in $(find . -type f -name '*.zip')
...@@ -33,12 +33,12 @@ do ...@@ -33,12 +33,12 @@ do
# echo "gre-"$green # echo "gre-"$green
# echo "blu-"$blue # echo "blu-"$blue
# if [ ! -d "rgb" ]; then if [ ! -d "rgbCroped" ]; then
# mkdir rgb mkdir rgbCroped
# fi fi
# fileout1=$(echo $filepattern | cut -d"_" -f1) fileout1=$(echo $filepattern | cut -d"_" -f1)
# fileout2=$(echo $filepattern | cut -d"_" -f2) fileout2=$(echo $filepattern | cut -d"_" -f2)
# #
# if [ ! -e rgb/$fileout2"_"$fileout1".tiff" ]; then # if [ ! -e rgb/$fileout2"_"$fileout1".tiff" ]; then
...@@ -46,18 +46,18 @@ do ...@@ -46,18 +46,18 @@ do
# fi # fi
# cd rgb cd rgbCroped
# if [ ! -d $fileout1 ]; then if [ ! -d $fileout1 ]; then
# mkdir $fileout1 mkdir $fileout1
# fi fi
# cd .. cd ..
# if [ ! -e rgb/$fileout1/$fileout2"_"$fileout1".jpg" ]; then if [ ! -e rgbCroped/$fileout1/$fileout2"_"$fileout1".jpg" ]; then
# gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -scale 0 4096 0 255 -of JPEG rgb/$fileout2"_"$fileout1".tiff" rgb/$fileout1/$fileout2"_"$fileout1".jpg" # gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -scale 0 4096 0 255 -of JPEG rgb/$fileout2"_"$fileout1".tiff" rgb/$fileout1/$fileout2"_"$fileout1".jpg"
## convert rgb/$fileout1/$fileout2"_"$fileout1"_t.jpg" -resize 640x480\! rgb/$fileout1/$fileout2"_"$fileout1".jpg" ## convert rgb/$fileout1/$fileout2"_"$fileout1"_t.jpg" -resize 640x480\! rgb/$fileout1/$fileout2"_"$fileout1".jpg"
## rm rgb/$fileout1/$fileout2"_"$fileout1"_t.jpg" ## rm rgb/$fileout1/$fileout2"_"$fileout1"_t.jpg"
# fi fi
cd $PRODCUTSDIR cd $PRODCUTSDIR
done done
......
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