Create Tanaka-style Illuminated Contour Maps in Surfer

The Tanaka method of creating illuminated contours 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: http://www.mbmg.mtech.edu/pdf/gis_illum.pdf

 

While Surfer does not support changing the width of the contour lines when creating a contour map as in the true Tanaka method, the fill colors can be altered based on the light source to create a very similar effect.


The same map is displayed using various techniques in Surfer. A map with a Tanaka-style effect is shown at the top, a map showing standard hill shading is shown in the lower left, and a map showing standard filled color contours is displayed in the lower right.

 

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. 
  2. Generate one in a different software package.
  3. Use the Home | Grid Data | 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.

  1. Click Grids | Edit | Spline Smooth.
  2. Select the low-resolution grid file, 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.  
  4. Click the Change Filename button to the right of Output Grid to change the file name and/or location of the modified grid file.
  5. Uncheck Add grid as layer to because some math must be applied before the map is ready to be created.
  6. Click OK.

 

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

  1. Click Grids | Calculate | 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 to change the file name and/or location of the modified grid file.
  5. Ensure Add grid as layer to is checked and a new color relief map will be created.
  6. Click OK.
  7. To fine tune the map, select the Color Relief layer in the Contents window, and in the Properties window:
    1. Change the Colors to any colormap you wish. For example, click Terrain and select Rainbow8.
    2. Make sure Interpolate pixels is checked.
    3. Ensure the Terrain representation is set to Hill shaded.
    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 be 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.


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

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 hill shading.

References:

  1. http://www.mbmg.mtech.edu/pdf/gis_illum.pdf
  2. http://wiki.gis.com/wiki/index.php/Tanaka_contours

 

Updated October 20, 2021

Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.