Book Image

Python Geospatial Analysis Cookbook

Book Image

Python Geospatial Analysis Cookbook

Overview of this book

Table of Contents (20 chapters)
Python Geospatial Analysis Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Other Geospatial Python Libraries
Mapping Icon Libraries
Index

Generating slope and aspect images from your DEM


Slope maps are very useful, for example, to help biologists identify habitat zones. Certain species only live in areas that are very steep—mountain goats, for instance. The slope raster can then quick identify potential habitat areas. To visualize this, we use QGIS to display our slope map, which will look similar to the following image. The area in white indicates the steeper area and the darker the color, the flatter the terrain:

Our aspect map displays the direction that the surface faces towards—such as north, east, south, and west—and this is expressed in degrees. In the screenshot, the orange area represents warm south-facing areas. The north-facing sides are cooler and are indicated in different hues of blues from our color spectrum. To achieve the colors, the QGIS singleband pseudocolor was classified into five continuous classes as shown in the following screenshot:

Getting ready

Ensure that your /ch07/geodata folder is downloaded and...