Created
March 24, 2014 08:17
-
-
Save jlehtoma/9736229 to your computer and use it in GitHub Desktop.
Batch replace ASCII rasters with GeoTIFF rasters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for FILE in *.asc | |
do | |
BASENAME=$(basename $FILE .asc) | |
OUTFILE=${BASENAME}.tif | |
echo "Processing: ${BASENAME}.asc" | |
gdal_translate -of GTiff -co COMPRESS=DEFLATE $FILE $OUTFILE | |
rm $FILE $FILE.* | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment