In this example, we'll combine previous techniques to combine our terrain hillshade from Chapter 7, Python and Elevation Data, with the color classification that we used on the LIDAR. For this example, we'll need the ASCII Grid DEMs named dem.asc and relief.asc that we used in the previous chapter.
We'll create a colorized DEM and a hillshade, and then use PIL to blend them together for an enhanced elevation visualization. The code comments will guide you through the example, as many of these steps are already familiar to you:
- First, we import the libraries that we need:
import gdal_array as gd
try:
import Image
except ImportError:
from PIL import Image
For this next part, you'll need the following two files: https://github.com/GeospatialPython/Learn/raw/master/relief.zip and https://github.com/GeospatialPython/Learn/raw/master/dem...