-
Book Overview & Buying
-
Table Of Contents
QGIS Python Programming Cookbook
By :
Remotely-sensed images are not just pictures; they are data. The value of the pixels has meaning that can be automatically analyzed by a computer. The ability to run statistical algorithms on a dataset is key to remote sensing. This recipe counts the number of unique combinations of pixels across multiple bands. A use case for this recipe will be to assess the results of image classification, which is a recipe that we'll cover later in this chapter. This recipe is in contrast to the typical histogram function, which totals the unique values and the frequency of each value per band.
We will use the SatImage raster available at https://geospatialpython.googlecode.com/files/SatImage.zip.
Place this raster in your /qgis_data/rasters directory.
This algorithm relies completely on the numpy module, which is included with PyQGIS. Numpy can be accessed through the GDAL package's gdalnumeric module. To do this, we need to perform the...
Change the font size
Change margin width
Change background colour