October 2013
Beginner to intermediate
364 pages
8h 8m
English
GDAL is the dominant geospatial library. Its raster capability is so significant that it is a part of virtually every geospatial toolkit in any language and Python is no exception. To see the basics of how GDAL works in Python, download the following sample raster satellite image as a ZIP file and unzip it: https://geospatialpython.googlecode.com/files/SatImage.zip
Let's open this image and see how many bands it has and how many pixels along each axis:
>>> from osgeo import gdal
>>> raster = gdal.Open("SatImage.tif")
>>> raster.RasterCount
3
>>> raster.RasterXSize
2592
>>> raster.RasterYSize
2693So we see this image has three bands, 2,592 columns of pixels, and 2,693 rows of pixels, as shown in OpenEV:
GDAL is an extremely fast geospatial raster ...
Read now
Unlock full access