Commit a120356c authored by Irving Sánchez's avatar Irving Sánchez

crea versiones reducidas de las imagenes para deplegarlas en reporte

parent 044c12c2
...@@ -8,6 +8,8 @@ BYTILE=${2:-0} ...@@ -8,6 +8,8 @@ BYTILE=${2:-0}
# exit # exit
#fi #fi
echo "Iniciando proceso..."
echo $USERDIR"findProducts.json"
wkt=$(getJSONparameter.py $USERDIR"findProducts.json" wkt) wkt=$(getJSONparameter.py $USERDIR"findProducts.json" wkt)
RED='\033[0;31m' RED='\033[0;31m'
NC='\033[0m' # No Color NC='\033[0m' # No Color
...@@ -37,7 +39,7 @@ L2AProductListExtractData.sh $USERDIR"L2A/" $USERDIR"jp2/" 4 ...@@ -37,7 +39,7 @@ L2AProductListExtractData.sh $USERDIR"L2A/" $USERDIR"jp2/" 4
#3.- Merge Images #3.- Merge Images
echo "Merging Images..." echo "************************************************* Merging Images..."
if [ $BYTILE -ne "0" ]; then if [ $BYTILE -ne "0" ]; then
echo "BY TILE" echo "BY TILE"
cd $USERDIR"jp2/" cd $USERDIR"jp2/"
...@@ -59,7 +61,7 @@ fi ...@@ -59,7 +61,7 @@ fi
#4.- Delete images with few data #4.- Delete images with few data
echo "Deleting Images..." echo "****************************************************** Deleting Images..."
if [ $BYTILE -ne "0" ]; then if [ $BYTILE -ne "0" ]; then
echo "BY TILE" echo "BY TILE"
cd $USERDIR"jp2/" cd $USERDIR"jp2/"
...@@ -82,6 +84,9 @@ if [ $BYTILE -ne "0" ]; then ...@@ -82,6 +84,9 @@ if [ $BYTILE -ne "0" ]; then
done done
cd ../TCI cd ../TCI
mogrify -format jpg -quality 100 *.tif mogrify -format jpg -quality 100 *.tif
mkdir thumbnails
mogrify -path ./thumbnails -resize 10% *.jpg
cd $USERDIR"jp2/" cd $USERDIR"jp2/"
done done
...@@ -106,10 +111,12 @@ else ...@@ -106,10 +111,12 @@ else
cd ../TCI cd ../TCI
echo "mogrify -format jpg -quality 100 *.tif" echo "mogrify -format jpg -quality 100 *.tif"
mogrify -format jpg -quality 100 *.tif mogrify -format jpg -quality 100 *.tif
mkdir thumbnails
mogrify -path ./thumbnails -resize 10% *.jpg
fi fi
#5.-Extract SCL information #5.-Extract SCL information
echo "Extracting SCL information..." echo "**************************************************** Extracting SCL information..."
cd $USERDIR"jp2/" cd $USERDIR"jp2/"
if [ $BYTILE -ne "0" ]; then if [ $BYTILE -ne "0" ]; then
echo "BY TILE" echo "BY TILE"
...@@ -123,6 +130,8 @@ if [ $BYTILE -ne "0" ]; then ...@@ -123,6 +130,8 @@ if [ $BYTILE -ne "0" ]; then
cd json cd json
tile=$(echo $i | cut -d "/" -f1) tile=$(echo $i | cut -d "/" -f1)
mergeL2ASCL_JSON.py $USERDIR"out/"$i"SCL/json/" > $USERDIR$tile"_sclData.json" mergeL2ASCL_JSON.py $USERDIR"out/"$i"SCL/json/" > $USERDIR$tile"_sclData.json"
echo $tile
echo "_sclData.json"
cd $USERDIR"jp2/" cd $USERDIR"jp2/"
done done
else else
...@@ -136,5 +145,9 @@ else ...@@ -136,5 +145,9 @@ else
cd json cd json
mergeL2ASCL_JSON.py $USERDIR"jp2/merge_out/SCL/json/" > $USERDIR"scl_data.json" mergeL2ASCL_JSON.py $USERDIR"jp2/merge_out/SCL/json/" > $USERDIR"scl_data.json"
fi fi
echo "Archivo"
echo $USERDIR
#mv *SCL_60m.tif json #mv *SCL_60m.tif json
#cd json #cd json
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