Merging rasters to generate a color relief map
Generating a color relief raster is a one-liner with the gdaldem color-relief
command line. If you want something that's a little more visually appealing, we will perform a combination of a slope, hillshade, and some color relief. Our end result is a single new raster representing a merge of layers to give a nice visual effect of elevation relief. The results are going to look similar to the following image:
Getting ready
For this exercise, you need to have the GDAL libraries installed that include the gdaldem
command-line tool.
How to do it...
- Let's begin by extracting some key information out of our DEM ...
Get Python Geospatial Analysis Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.