Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mkdir ${TARGET_DIR}_tif
- echo "building ${BIG_TIF}.tif"
- find . -iname '*.asc' -type f | xargs gdal_merge.py -o ${TARGET_DIR}_tif/${BIG_TIF}.tif -co "TILED=YES" -co "BLOCKXSIZE=512" -co "BLOCKYSIZE=512" -co "COMPRESS=DEFLATE" -co "ZLEVEL=9" -init -9999 -a_nodata -9999 -n -9999 -ot Int16
- echo "assigning srs to ${BIG_TIF}.tif"
- gdal_translate -a_nodata 0 -ot Int16 -a_srs "EPSG:2154" -co "TILED=YES" -co "BLOCKXSIZE=512" -co "BLOCKYSIZE=512" -co "COMPRESS=DEFLATE" -co "ZLEVEL=9" ${TARGET_DIR}_tif/${BIG_TIF}.tif ${TARGET_DIR}_tif/${BIG_TIF}_CRS.tif
- mv ${TARGET_DIR}_tif/${BIG_TIF}_CRS.tif ${TARGET_DIR}_tif/${BIG_TIF}.tif
- echo "building pyramid"
- mkdir $TARGET_DIR
- gdal_retile.py -v -r bilinear -levels 6 -ps 2048 2048 -ot Int16 -co TILED=YES -co COMPRESS=DEFLATE -targetDir $TARGET_DIR ${TARGET_DIR}_tif/${BIG_TIF}.tif
- cd $TARGET_DIR
- mkdir 0
- mv *.tif 0/
- cd -
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement