dir loop

parent 155f4e54
......@@ -69,9 +69,14 @@ cd $JP2DIR
for f in *; do
if [ -d ${f} ]; then
cd $f
echo "gdal_merge.py -o ../"$f".tif " $(ls *.jp2)
gdal_merge.py -o ../$f".tif" $(ls *.jp2)
if [ ! -e ../$f".tif" ]; then
echo "gdal_merge.py -o ../"$f".tif" $(ls *.jp2)
gdal_merge.py -o ../$f".tif" $(ls *.jp2)
fi
cd ..
if [ ! -e ../$f".jp2" ]; then
gdal_translate -projwin $BOX -projwin_srs WGS84 -ot Byte -of JPEG $f".tif" $f".jp2"
fi
echo $f
fi
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