Follow

Recreating Hand Drawn Contour Maps Using Didger And Surfer

Have you ever had a scanned contour map that you wanted to convert into a digital version? You might want to do this to easily change contour intervals or colors, to overlay the contours with other map types, or to calculate volumes or perform other grid functions. This is a common question from our Didger and Surfer users.

1-Recreate
Digitally recreating contours in Surfer from hand drawn contour maps digitized in Didger
is a powerful process to optimally visualize, present and evaluate your data.

 

A problem arises when recreating contours in Surfer from data digitized in Didger when unwanted effects are created, such as jagged contours or squiggly lines in areas where the contours should be smooth. This is because Surfer interpolates between data points, and the data points created along the contour lines in Didger are very closely spaced relative to the distance between the contour lines. The difference in spacing creates great variation along the contour lines and results in the squiggly lines.

2-Artifacts
Contours were digitized in Didger, exported to a data file, and gridded in Surfer.
When a contour map is created from the grid file, the contours are not smooth.
Unwanted artifacts, or squiggly lines, are visible in many places on the map.

 

This article will describe how to digitize the contours in Didger and recreate them in Surfer without the artifacts. To solve the problem of the artifacts, space out or thin the data points along the digitized lines in Didger prior to exporting the data file. You can do this in Didger a few ways. This article will walk through two of the more common methods:

  1. Increase the vertex tolerance value before you digitize the contours
  2. Thin the digitized polylines after creation

These two methods are described in more detail below. Once the data points (or vertices) along the contours lines are thinned, the data can be exported from Didger and gridded and displayed in Surfer.

Method 1: Increasing the Vertex Tolerance

The first method mentioned above involves increasing the vertex tolerance prior to digitizing the contours in Didger. The vertex tolerance is the minimum spacing between vertices along a polyline or polygon or between points. When digitizing the contours, Didger cannot create vertices along the polyline closer than this value. Setting the vertex tolerance for this method requires estimating the average distance between the contour lines on the image in map units. For this example, a value of 20 is selected.

    1. Click File | Import, select the image and click Open.
    2. Walk through the Image Registration and Warping dialog to calibrate the image, and click OK to import it. For more information on calibrating an image, please click Help | Tutorial and walk through Lesson 2 – Image Calibration.
    3. If you wish to save the georeferenced image, you can click File | Export and export to a new TIF file. In the Export Options, on the Spatial References page, choose to save the spatial reference information in the Internal file format (if possible) and click OK.
    4. Click Tools | Project Settings, click the Tolerance Settings tab, and set the Vertex (Weed)Tolerance to the average distance between contour lines. For this example, a value of 20 is entered. Setting the vertex tolerance will not allow any two vertices (data points that define the contour line) to be recorded closer than the distance specified. This will effectively eliminate overly defined contour lines (too many vertices along the line).
3-Vertex
On the Tolerance Settings page of the Project Settings dialog,
enter the average distance between contour lines
as the
Vertex (Weed) Tolerance value.
    1. Click OK.
    2. Digitize the contours in “stream” mode. To do this, click Draw | Polyline.
    3. Before you start drawing the polylines, in the Property Manager, under Increment Settings, check Enter Data After Creation and Create Several.
    4. Click and trace over one of the contours. Note that if you click the right mouse button you will “undo” the last created vertex. This makes it easy to backup and redigitize a segment if you make a mistake.
    5. When you are finished, double click or press ENTER on the keyboard.
    6. In the Enter Object Data dialog, enter the Z value of the contour line as the Primary attribute value.
4-EnterObjectData
Enter the Z value of the contours as the Primary attribute value.
    1. Click OK.
    2. Repeat so that all the contours are digitized.
5-DigitizeContours
All the hand drawn contour lines on this image were digitized as green polylines,
with a vertex tolerance of 20.
  1. Click File | Export and export to a Golden Software Data (*.dat) file format. The X, Y and Primary attribute value for all the vertices for all the polylines are exported to a data file.

Method 2: Thinning the Digitized Contours

The second method involves digitizing the polylines with the default settings, or having Didger vectorize them automatically, and then thinning them afterwards.

    1. Click File | Import, select the image and click Open.
    2. Walk through the Image Registration and Warping dialog to calibrate the image, and click OK to import it. For more information on calibrating an image, please click Help | Tutorial and walk through Lesson 2 – Image Calibration.
    3. If you wish to save the georeferenced image, you can click File | Export and export to a new TIF file. In the Export Options, on the Spatial References page, choose to save the spatial reference information in the Internal file format (if possible) and click OK.
    4. Digitize the contours in “stream” mode. To do this, click Draw | Polyline.
    5. Before you start drawing the polylines, in the Property Manager, under Increment Settings, check Enter Data After Creation and Create Several.
    6. Click and trace over one of the contours. When you are finished, double click or press ENTER on the keyboard.
    7. In the Enter Object Data dialog, enter the Z value of the contour line as the Primary attribute value.
4-EnterObjectData
Enter the Z value of the contours as the Primary attribute value.
    1. Click OK.
    2. Repeat so that all the contours are digitized.
    3. Press ESC on the keyboard to exit digitizing mode.
6-DigitizeContours
All the hand drawn contour lines on this image were digitized as blue polylines.
    1. Now it is time to thin the data along the points. To view the number of vertices along the lines, select one of the polylines and click Draw | Reshape. That will show you all the vertices along the lines. If the vertices are so close that the boxes around the vertices run into each other, then you should thin the lines.
7-CloseVertices
The indicated polyline is in reshape mode.
The vertices are so close together, that you
cannot discern them individually.
    1. Select all the polylines in the project.
    2. Click Draw | Thin and Smooth. You can choose any of the options. For example, select Keep Every nth Point, increase the Removal Rate, and click OK. The goal is to get the vertices spaced out a little more, so that the space between vertices is similar to the average space between the closest of the original contour lines:
8-ThinnedVertices
Thin the polylines so that the vertices are spaced
out along the lines. In this case,
Keep Every nth
Point was used with a Removal Rate of 30.
  1. You can select a polyline and click Draw | Reshape again to check the spacing of the vertices. You may need to click Edit | Undo and thin the lines again.
  2. If any of the lines have changed to be drastically different from the contour lines on the image, you can reshape the polyline to add or move vertices so that the new polylines conform to the original contour lines on the image.
  3. Once the lines are thinned to an acceptable spacing, click File | Export and export to a Golden Software Data (*.dat) file format. The X, Y and Primary attribute value for all the vertices for all the polylines are exported to a data file.

Gridding the Data and Recreating Contours

Once the data has been digitized in Didger and exported to a data file, you can grid it in Surfer to recreate the contour maps. To do this, follow these steps:

  1. Click Grid | Data, select the data file exported above and click Open.
  2. In the Grid Data dialog,
    1. Select Kriging as the gridding method.
    2. Modify the grid line Spacing to a value that it is approximately ¼ to ½ of the distance between the data points. In this example, a grid spacing value of 10 was used.
  3. Click OK and the grid file is created.
  4. Click Map | New | Contour Map, select the grid file and click Open.
  5. You can compare the new contour map to your original map by adding a post layer of the data file, and adding a base layer of the original georeferenced image.
9-Result
Overlay the original contours (in black) with the new contours (in blue) created from gridding the digitized points.
This new contour map was created by digitizing the contours and thinning them prior to export (method 2 above).

 

10-Surface
Once you have a grid file of the data, you can use it to create other map types, such as 3D surface maps,
or perform other grid calculations, such as finding the volume and area.

 

If the resulting grid file does not represent the original contours well, you can try modifying the grid line spacing, gridding method, and search radius options during gridding to yield more appropriate results. Experimenting with the various gridding methods and options will often be required to achieve the final map product. You can also blank portions of the map outside or inside specific areas to remove unwanted data from the grid.

Recreating hand drawn or hard copy contours in Surfer is a great method for presenting maps in a professional manner, customizing the visualization methods, and easily performing calculations on the data. For example, once you have the digital data and gridded in a grid file, you can:

  • Recreate the contour map, changing the contour intervals and line or fill colors
  • Display the data as another map type or overlay other data on top of the map for a more effective presentation
  • Perform calculations on the data, such as calculating volumes or areas
  • Analyze the data, such as finding the areas of steepest slope or the average Z value
  • And more!
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.