Hillshade is the representation of the earth’s surface under the radiation of sun. A terrain raster data can be better visualized by adding the information of hillshades. This blog will introduce some procrdures to overlay the hillshade with terrain for a nice picture.
First, let’s import the required packages.
1 | from osgeo import gdal |
Second, we download and read a sample data
1 | !eio --product SRTM3 clip -o DEM.tif --bounds -122.4 41.2 -122.1 41.3 |
Then we calculated the hillshade using the function I referenced from Download and Process DEMs in Python
1 | def hillshade(array, azimuth, angle_altitude): |
Finally, we plotted three figures, one is the simple dem plot, the other two are the topography overlayed by hillshade using different alpha.
1 | fig = plt.figure(figsize=(12, 4)) |
References
Kommentare