Last active
July 5, 2022 06:30
-
-
Save cquest/8179870 to your computer and use it in GitHub Desktop.
transparent hillshade cooking guide using gdal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ingredients: | |
- a decent DEM | |
- gdal | |
- some computer | |
# compute grayscale hillshade using gdaldem | |
gdaldem hillshade -compute_edges you_dem_file hillshade.tif | |
# in another bowl, prepare the following shade.ramp file | |
0 0 0 0 255 | |
32 0 0 0 250 | |
64 0 0 0 210 | |
96 0 0 0 128 | |
128 0 0 0 0 | |
160 255 255 255 0 | |
192 255 255 255 0 | |
224 255 255 255 96 | |
255 255 255 255 128 | |
nv 0 0 0 0 | |
# stir together using gdaldem color-relief | |
gdaldem color-relief - hillshade.tif -alpha shade.ramp hillshade-overlay.tif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be awesome if you could include some output examples. Thanks for the info!