Created
February 4, 2014 19:32
-
-
Save MateoV/8810641 to your computer and use it in GitHub Desktop.
Script to split a Mexico 15m DEM file into smaller chunks
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 | |
set -e -u | |
width=218763 | |
height=130943 | |
y=0 | |
while [ $y -lt $height ] | |
do | |
x=0 | |
while [ $x -lt $width ] | |
do | |
outtif=t_${y}_$x.tif | |
gdal_translate -srcwin $x $y 10000 10000 -co compress=lzw CEM3.0_R15m.bil mexico/${outtif} | |
let x=$x+10000 | |
done | |
let y=$y+10000 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment