3

I'm wondering if there is any way to create a map similar to the image below. Basically, it would be the contours extruded, add a singleband pseudocolor ramp as the color on top, and be able to control sun direction/shading.

Typically, I have very detailed DEM GeoTIFFs, as well as vector contours to work from.

Also, is there a specific name for this type of map? I've always called it an elevation layer cake

enter image description here

4
  • 3
    Search for Tanaka contour, if you use QGIS you will find several tutorial and I think there is even a plugin...
    – J.R
    Commented Aug 19, 2023 at 20:12
  • 1
    To use the plugin you need to check "Enable experimental plugins" in Plugin Manager->Settings. I also had to edit the plugin to change {profile folder}/python/plugins/tanaka_contours/tanaka_contours.py line 88 to block = provider.block(1, extent, int(rows), int(cols)).
    – user2856
    Commented Aug 19, 2023 at 21:13
  • 1
    Old but : geosupportsystem-se.translate.goog/2015/11/30/tanaka-style/…
    – Bera
    Commented Aug 20, 2023 at 8:15
  • As per the Tour there should be only one question asked per question even if the first is unmarked.
    – PolyGeo
    Commented Aug 20, 2023 at 12:10

2 Answers 2

8

Illuminated Contours, often called Tanaka Contours.

There are many different ways of creating them in QGIS. Keep in mind that quite a few of the older tutorials are now out of date as newer versions of QGIS have more styling options.

Here's a couple of very basic methods that can be set up in a few minutes. There is plenty of tweaking that can be done to produce superior outputs. If you are looking for photorealistic output, that may be beyond QGIS.

Raster Version

Starting with your original DEM, use (GDAL) Raster Calculator to calculate a stepped DEM using a formula like: 40 * round(A/40,0)

Style your stepped DEM using Hillshade.

enter image description here

Style your original DEM using a single-band pseudocolor, with blending mode set to Multiply.

enter image description here

Ensure your stepped DEM is under your original DEM in the layer order - you should end up with output like the following:

enter image description here

Vector Version

Starting with your DEM, use Contour Polygons (from the Processing Toolbox) to create the contours.

enter image description here

Style as follows:

  • Select Graduated
  • Set the value to ELEV_MIN and Classify
  • Click on the Symbol, select Simple Fill, and check the Draw effects box

enter image description here

Add a Drop Shadow

enter image description here

This will give you something like the below:

enter image description here

1
  • Great answer - rather a tutorial!
    – Babel
    Commented Nov 14, 2023 at 9:27
4

You are correct -- it's called Tanaka Contours. I also found this helpful video: https://www.youtube.com/watch?v=ORvdWyGCUVQ

I will mark this as solved/answered once my permissions let me in 2 days.

Edit to add more details (hope this is allowed - credit to anitagraser.com for the functions and process).

The solution to doing this in QGIS is to first split the contours into smaller segments using Split or v.split tool. Then, you can use the Python Field Calculator to calculate azimuth of each segment using the following function: p1 = $geom.asPolyline()[0] p2 = $geom.asPolyline()[-1] a = p1.azimuth(p2) if a < 0: a += 360 value = a

After that, you can color the contours based on a function using the azimuth. The function below does it by controlling the L (lightness) of the HSL color value: color_hsl( 0,0, scale_linear( abs( (if( "azimuth" < 45, "azimuth" +315, "azimuth" -45)) -180) ,0,180,0,100) ) Then, it's simply adjusting the underlying DEM to be a discrete color ramp and playing with line thicknesses, etc.

You can also simply apply the style shared here: https://plugins.qgis.org/styles/68/

3
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Aug 20, 2023 at 0:23
  • 1
    This is more comment than Answer, which is why it is attracting removal votes.
    – Vince
    Commented Aug 20, 2023 at 14:30
  • Thanks, and sorry...new to stack exchange. I added details on the solution so hopefully that is helpful to others. Commented Aug 20, 2023 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.