Golden Software Blog

Helping you learn more about the latest product information, tips, tricks, techniques, and customer stories so you can visualize data and communicate results with ease.
Font size: +

Variations in Hillshading: Creating Tanaka-style Illuminated Contour Maps

There many methods for displaying contour lines in visualization and GIS software programs. In most cases, representing terrain data with standard contours or hillshading techniques are sufficient. In other cases, you may want a more artistic technique to help emphasize specific features in the data or to make the map more pleasing to the eye. One of these techniques is using the Tanaka method for creating illuminated contours. I recently read an article about how to create illuminated contours in ArcGIS and couldn’t resist trying to replicate the results in Surfer's mapping software.

The Tanaka method applies a northwest light source to a contour map. The contour lines then change in color and width based on their relationship to the light source. Contour lines facing the light source are drawn in white while those in the shadow are drawn in black. The contour lines facing the light source (or facing away from it) are thicker, and the contour lines in the orthogonal direction are thinner. A more detailed explanation of the method can be found online at:

While Surfer's mapping data software cannot change the width of the contour lines and create a contour map as in the true Tanaka method, you can alter the colors based on the light source and create a very similar effect.

Tanaka style illuminated contours vs standard hillshading and contoursThe same map is displayed using various techniques. A map with a Tanaka-style effect is shown at the top, a map showing standard hillshading is shown in the lower left, and a map showing standard filled color contours is displayed in the lower right. All maps are created in Surfer 13.

To create a map with a Tanaka-style effect in Surfer, you start with a grid file. If you do not have a grid file (a.k.a., a raster), you can either:

  1. Download it from an online source, such as the USGS. In this example, we will use an example file, NEDGrid_CO.grd.
  2. Generate one in a different software package.
  3. Use the Grid | Data command in Surfer to create a grid file from a set of XYZ data points.


In addition, the grid file should have a relatively high resolution. I find that a grid file with around 2000 grid nodes minimum works well. If you do not have sufficiently high grid resolution, then the “contour lines” do not look as defined in the resulting map. If you have a grid file, but it is a low-resolution grid file, then you can increase the resolution by following the steps below. Click here to download the grid NEDGrid_CO.grd which we will use in this example.

  1. Click Grid | Spline Smooth.
  2. Select the low-resolution grid file, such as NEDGrid_CO.grd, and click Open.
  3. In the Spline Smooth dialog, under Number Nodes to Insert, increase the number so that the Final Grid Size shows around 2000 nodes in X and Y.  For this grid, I will change the Between Rows and Between Cols values both to 1 so the final grid will be 2459 x 2461.
  4. Click the Change Filename button to the right of Output Grid File to change the file name and/or location of the modified grid file.
  5. Click OK.


Once you have a high resolution grid, you can follow the steps below to create the Tanaka-style contour map:

  1. Click Grid | Math.
  2. In the Grid Math dialog, click the Add Grids button, select the high resolution grid file and click Open.
  3. Enter the following function to quantize the Z elevations: floor(A/100) * 100. In this function, 100 will be the “contour interval” in the resulting map. You can replace 100 in this function with any value you wish.
  4. Click the Change Filename button to the right of Output Grid File to change the file name and/or location of the modified grid file.
  5. Click OK.
  6. Click Map | New | Image Map, select the grid file created above and click Open.
  7. To fine tune the map, select the Image layer in the Property Manager, and in the Object Manager:
    1. Change the Colors to any colormap you wish. For example, click the button showing the Terrain colors and select Rainbow6.
    2. Make sure Interpolate pixels is checked.
    3. Enable hill shading should also be checked.
    4. Set the Horizontal light angle to 135°. This will place the light source in the northwest. For Surfer’s calculations, the 0° is directly to the right (“east” on a compass) and rotates counter-clockwise. So 315° on a compass azimuth (northwest) is actually 135° for Surfer.
    5. The Vertical light angle can changed to another value, such as 30. Increase this value if you wish to brighten the display, or decrease it to darken the display.
    6. Decrease the Z scale factor by about half the default value. You may need to experiment to find just the right value you want for your data.
    7. Increase the Ambient light intensity to 0.4. Again, you may want to try different values to find the right value for your data. If you use a larger vertical light angle (e.g. 35°), then you might want to try a slightly smaller ambient light intensity, such as 0.30.

Illuminated contours using Tanaka method

Create stunning illuminated “contours” in Surfer with the modified grid file using an image map with hillshading.

Although the map created in Surfer is not an illuminated contour map using the true Tanaka method (as the contour lines do not change thickness depending on their orientation to the light source), it is still a very beautiful alternative to displaying contours with standard hillshading.



Comments 3

Guest - Alberto Vargas on Wednesday, 13 January 2016 13:40

Excellent contribution. Very interesting article.

Excellent contribution. Very interesting article.
Guest - Eugene on Wednesday, 13 January 2016 13:30

Awesome will definitely try this

Awesome will definitely try this
Guest - dan on Wednesday, 13 January 2016 09:07

very nice!

very nice!
Tuesday, 21 March 2023

Captcha Image

Subscribe To Our Blog

Most Popular

Over the years, one of the most common questions asked is “How can I get my contour map out of Surfe...
Creating a map of slopes is common practice when looking at slope stability. Some examples of when y...
I'm pleased to introduce our first ever guest blogger, Scott Carter, Owner and Creative Director of ...

Exceeding expectations

Our customers

Go to top