-
Book Overview & Buying
-
Table Of Contents
QGIS Python Programming Cookbook
By :
A heat map is used to show the geographic clustering of data using a raster image that shows density. The clustering can also be weighed using a field in the data to not only show geographic density but also an intensity factor. In this recipe, we'll use earthquake point data to create a heat map of the impact of an earthquake and weigh the clustering by the earthquake's magnitude.
This recipe requires no preparation.
We will build a map with a worldwide base layer of countries and earthquake locations, both in GeoJSON. Next, we'll run the SAGA kernel density estimation algorithm to produce the heat map image. We'll create a layer from the output, add a color shader to it, and add it to the map.
To do this, we need to perform the following steps:
from PyQt4.QtCore import * from PyQt4.QtGui import * import processing
Change the font size
Change margin width
Change background colour