Commit 2ea681af authored by Mario Chirinos Colunga's avatar Mario Chirinos Colunga 💬

parallel

parent 8e37fdc6
#!/bin/sh
#!/bin/bash
JP2DIR=$1 #JP2 Directory
POLYGON=$2 #Crop Window
JOBS=${3:-1}
#BOX=$(python3 polygonToBox.py "$POLYGON")
#cd $JP2DIR
#for dir in *; do
# if [ -d ${dir} ]; then
# cd $dir
# if [ ! -e ../$dir".tif" ]; then
# echo "gdal_merge.py -o ../"$dir".tif" $(ls *.jp2)
# gdal_merge.py -o ../$dir".tif" $(ls *.jp2)
# fi
# cd ..
# if [ ! -e ../$dir".jp2" ]; then
# gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -of JPEG $dir".tif" $dir".jp2"
# fi
# rasterWkt.py "$POLYGON" $dir.jp2 $dir"_p.tif"
# echo $dir
# fi
#done
#cd $JP2DIR
#find . -name *.xml -type f -delete
if [ "$#" -le 2 ]; then
......@@ -33,7 +10,7 @@ if [ "$#" -le 2 ]; then
fi
cd $JP2DIR
ls -d */ | parallel --jobs $JOBS test.sh {} "$POLYGON"
ls -d */ | parallel --jobs $JOBS test.sh {} "$POLYGON"
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