Created
April 2, 2019 20:04
-
-
Save jscarto/b6a4b3af0ef8bff7ced22496aa324441 to your computer and use it in GitHub Desktop.
An example using Bash and gdal to loop through existing tif files to create 16-bit scaled versions, with new filenames including "_stretched"
This file contains 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 f in *. tif; do | |
gdal_translate -ot UInt16 -scale 0 8e-9 0 65536 -outsize 800 0 -r bilinear $f "${f%.*}_stretched.tif" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment