Created
February 9, 2013 01:05
-
-
Save bmount/4743305 to your computer and use it in GitHub Desktop.
reminder about breaking up huge National Agricultural Imagery Program (NAIP) tif files
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
# coding: utf-8 | |
import os | |
# naip SF collection in geotiff from gdalinfo via mrsiddecode: | |
xmax = 72260 | |
ymax = 21650 | |
x = xmax | |
y = 21650 | |
tmp = """gdal_translate -of PNG -srcwin {0} {1} 2000 2000 sf2012.tif bigslice/sf_partial-{2}.png""" | |
while x > 0: | |
while y > 0: | |
os.system(tmp.format(x, y, str(x)+'-'+str(y))) | |
y -= 2000 | |
y = ymax | |
x -= 2000 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment