#!/bin/bash

# $1 bron directory
# $2 doel directory
src_dir=2017-R11
dst_dir=2017-R11_pdok

for src_tif in `ls -1 $src_dir/*.tif`
do
    # Doel file
    dst_tif=$dst_dir/`basename $src_tif|cut -d'.' -f1`.tif

    echo "START CONVERT $src_tif to $dst_tif"
    gdal_translate -co compress=deflate -co tiled=yes -co profile=geotiff -co blockxsize=512 -co blockysize=512 -b 1 -b 2 -b 3 -a_nodata none $src_tif $dst_tif
    echo "END CONVERT $src_tif"

done
