Last active
August 29, 2015 14:07
-
-
Save jdherman/a547c2c174a3b71b3c29 to your computer and use it in GitHub Desktop.
clip raster data with shapefile example
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 | |
| DIR=current | |
| TYPE=tmean | |
| RES=5m | |
| pwd | |
| for MONTH in {1..12} | |
| do | |
| gdalwarp -cutline states_shape/states.shp \ | |
| -crop_to_cutline -dstnodata "-9999.0" \ | |
| ${DIR}/${TYPE}_${RES}/${TYPE}${MONTH}.bil \ | |
| ${DIR}/${TYPE}_${RES}_usa/${TYPE}_${MONTH}.bil | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment