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

rgb

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