Skip to content

Instantly share code, notes, and snippets.

@oeon
Created July 12, 2012 23:09
Show Gist options
  • Save oeon/3101727 to your computer and use it in GitHub Desktop.
Save oeon/3101727 to your computer and use it in GitHub Desktop.
trim rasters from ogrinfo extent
#!/bin/bash
FILES=$(ls *.shp);
for FILE in $FILES
cat list.txt | while read CMD;
do
gdal_translate -projwin ${CMD} -of GTiff ${FILE} ./out/${FILE}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment