Commit 62f3378c authored by Mario Chirinos's avatar Mario Chirinos

update

parent b97cb4d7
...@@ -80,89 +80,89 @@ else ...@@ -80,89 +80,89 @@ else
fi fi
##4.- Mask raster with shape file ##4.- Mask raster with shape file
#echo ${RED}"\nApplying Mask..."${NC} echo ${RED}"\nApplying Mask..."${NC}
#if [ $BYTILE -ne "0" ]; then if [ $BYTILE -ne "0" ]; then
# echo "BY TILE" echo "BY TILE"
# cd $USERDIR"out/" cd $USERDIR"out/"
# for d in $(ls -d */) ; do for d in $(ls -d */) ; do
# cd $d cd $d
# if [ ! -d "mask" ]; then if [ ! -d "mask" ]; then
# mkdir mask mkdir mask
# fi fi
# for i in $(ls *.tif) ; do for i in $(ls *.tif) ; do
# if [ ! -e mask/$i ]; then if [ ! -e mask/$i ]; then
# gdalwarp -cutline $USERDIR"myshape/wkt.shp" -crop_to_cutline -dstalpha $i mask/$i gdalwarp -cutline $USERDIR"myshape/wkt.shp" -crop_to_cutline -dstalpha $i mask/$i
# else else
# echo "Passing " $i echo "Passing " $i
# fi fi
# done done
# cd .. cd ..
# done done
#else else
# echo "BY DATE" echo "BY DATE"
# cd $USERDIR"out/" cd $USERDIR"out/"
# if [ ! -d "mask" ]; then if [ ! -d "mask" ]; then
# mkdir mask mkdir mask
# fi fi
# for i in $(ls *.tif) ; do for i in $(ls *.tif) ; do
# if [ ! -e mask/$i ]; then if [ ! -e mask/$i ]; then
# gdalwarp -cutline ../myshape/wkt.shp -crop_to_cutline -dstalpha $i mask/$i gdalwarp -cutline ../myshape/wkt.shp -crop_to_cutline -dstalpha $i mask/$i
# else else
# echo "Passing " $i echo "Passing " $i
# fi fi
# done done
#fi fi
##5.- Delete images with few data #5.- Delete images with few data
#echo ${RED}"\nDeleting Images..."${NC} echo ${RED}"\nDeleting Images..."${NC}
#if [ $BYTILE -ne "0" ]; then if [ $BYTILE -ne "0" ]; then
# echo "BY TILE" echo "BY TILE"
# cd $USERDIR"out/" cd $USERDIR"out/"
# for i in $(ls -d */) ; do for i in $(ls -d */) ; do
# cd $i"mask" cd $i"mask"
# echo $i echo $i
# if [ ! -d "SCL" ]; then if [ ! -d "SCL" ]; then
# mkdir SCL mkdir SCL
# fi fi
# cp *SCL_60m.tif SCL cp *SCL_60m.tif SCL
# cd SCL cd SCL
# ls *.tif | parallel --jobs 4 imageMissingData.py {} $USERDIR"findproducts.json" 70 ls *.tif | parallel --jobs 4 imageMissingData.py {} $USERDIR"findproducts.json" 70
# if [ ! -d "../TCI" ]; then if [ ! -d "../TCI" ]; then
# mkdir ../TCI mkdir ../TCI
# fi fi
# for scl in $(ls *.tif) for scl in $(ls *.tif)
# do do
# fileprefix=$(echo $scl | (cut -d"_" -f1)) fileprefix=$(echo $scl | (cut -d"_" -f1))
# cp ../$fileprefix"_TCI_10m.tif" ../TCI/$fileprefix"_TCI_10m.tif" cp ../$fileprefix"_TCI_10m.tif" ../TCI/$fileprefix"_TCI_10m.tif"
# done done
# cd $USERDIR"out/" cd $USERDIR"out/"
# done done
#else else
# echo "BY DATE" echo "BY DATE"
# cd $USERDIR"out/mask/" cd $USERDIR"out/mask/"
# if [ ! -d "SCL" ]; then if [ ! -d "SCL" ]; then
# mkdir SCL mkdir SCL
# fi fi
# cp *SCL_60m.tif SCL cp *SCL_60m.tif SCL
# cd SCL cd SCL
# ls *.tif | parallel --jobs 4 imageMissingData.py {} $USERDIR"findProducts.json" 70 ls *.tif | parallel --jobs 4 imageMissingData.py {} $USERDIR"findProducts.json" 70
# if [ ! -d "../TCI" ]; then if [ ! -d "../TCI" ]; then
# mkdir ../TCI mkdir ../TCI
# fi fi
# for scl in $(ls *.tif) for scl in $(ls *.tif)
# do do
# fileprefix=$(echo $scl | (cut -d"_" -f1)) fileprefix=$(echo $scl | (cut -d"_" -f1))
# cp ../$fileprefix"_TCI_10m.tif" ../TCI/$fileprefix"_TCI_10m.tif" cp ../$fileprefix"_TCI_10m.tif" ../TCI/$fileprefix"_TCI_10m.tif"
# cd ../TCI cd ../TCI
# done done
#fi fi
##6.-Creating Thumbnails ##6.-Creating Thumbnails
##echo ${RED}"Creating Thumbnails"${NC} ##echo ${RED}"Creating Thumbnails"${NC}
##if [ $BYTILE -ne "0" ]; then ##if [ $BYTILE -ne "0" ]; then
...@@ -201,28 +201,28 @@ fi ...@@ -201,28 +201,28 @@ fi
##fi ##fi
##7.-Extract SCL information #7.-Extract SCL information
#echo ${RED}"Extracting SCL information..."${NC} echo ${RED}"Extracting SCL information..."${NC}
#if [ $BYTILE -ne "0" ]; then if [ $BYTILE -ne "0" ]; then
# echo "BY TILE" echo "BY TILE"
# cd $USERDI##8.-Extract SCL morphology cd $USERDI##8.-Extract SCL morphology
#echo ${RED}"Extracting SCL morphology..."${NC} echo ${RED}"Extracting SCL morphology..."${NC}
#if [ $BYTILE -ne "0" ]; then if [ $BYTILE -ne "0" ]; then
# echo "BY TILE" echo "BY TILE"
#else else
# echo "BY DATE" echo "BY DATE"
# cd $USERDIR"out/mask/SCL/" cd $USERDIR"out/mask/SCL/"
# if [ ! -d "morph" ]; then if [ ! -d "morph" ]; then
# mkdir morph mkdir morph
# fi fi
# GI_SCLmorphImageListToJSON.sh $USERDIR"out/mask/SCL/" $USERDIR"findProducts.json" 6 GI_SCLmorphImageListToJSON.sh $USERDIR"out/mask/SCL/" $USERDIR"findProducts.json" 6
# mv *.json morph mv *.json morph
# cd morph cd morph
# mergeL2ASCL_JSON.py $USERDIR"out/mask/SCL/morph/" > $USERDIR"scl_morph.json" mergeL2ASCL_JSON.py $USERDIR"out/mask/SCL/morph/" > $USERDIR"scl_morph.json"
#fi fi
#exitR"out/" #exitR"out/"
# for i in $(ls -d */) ; do # for i in $(ls -d */) ; do
......
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