Skip to content

Instantly share code, notes, and snippets.

@chryss
Created November 17, 2013 19:56
Show Gist options
  • Save chryss/7517501 to your computer and use it in GitHub Desktop.
Save chryss/7517501 to your computer and use it in GitHub Desktop.
from osgeo import gdal
arys = []
ds = gdal.Open('sample.tif', gdal.GA_ReadOnly)
for i in xrange(1, ds.RasterCount+1):
arys.append(ds.GetRasterBand(i).ReadAsArray())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment