#!/bin/bash
# JvdB shorthands
#
trans=${PWD}/topotrans.sh
# trans=/opt/nlextract/git/opentopo/bin/topotrans.sh
wfiles=/var/www/nlextract.nl/data/opentopo/worldfiles/wfiles
rel=2016-R08
resos="100pixkm 200pixkm 400pixkm 800pixkm 1600pixkm 3200pixkm"

for reso in ${resos}
do
   echo "START ${reso}"
   /bin/rm -rf ${reso}/geotif/${rel} > /dev/null 2>&1

   #cp ${wfiles}${reso}/*.wld ${reso}/tif/${rel}
   chown -R jwvaalst:jwvaalst ${reso}/tif/${rel}

   mkdir -p ${reso}/geotif/${rel}
   $trans ${reso}/tif/${rel} ${reso}/geotif/${rel} > ${reso}/geotif/${rel}/trans.log 2>&1
   chown -R kadmin:kadmin ${reso}/geotif
   echo "END ${reso}"
done


