KB no longer maintained - Didger is a Legacy Product. Legacy Products are still supported, but no longer receive new features or updates. The majority of Didger's features have been moved to Surfer. Please contact support@goldensoftware.com with any questions. |
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.
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.
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:
- Increase the vertex tolerance value before you digitize the contours
- 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.
- Click File | Import, select the image and click Open.
- 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.
- 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.
- 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).
On the Tolerance Settings page of the Project Settings dialog, enter the average distance between contour lines as the Vertex (Weed) Tolerance value. |
- Click OK.
- Digitize the contours in “stream” mode. To do this, click Draw | Polyline.
- Before you start drawing the polylines, in the Property Manager, under Increment Settings, check Enter Data After Creation and Create Several.
- 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.
- When you are finished, double click or press ENTER on the keyboard.
- In the Enter Object Data dialog, enter the Z value of the contour line as the Primary attribute value.
Enter the Z value of the contours as the Primary attribute value. |
- Click OK.
- Repeat so that all the contours are digitized.
All the hand drawn contour lines on this image were digitized as green polylines, with a vertex tolerance of 20. |
- 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.
- Click File | Import, select the image and click Open.
- 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.
- 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.
- Digitize the contours in “stream” mode. To do this, click Draw | Polyline.
- Before you start drawing the polylines, in the Property Manager, under Increment Settings, check Enter Data After Creation and Create Several.
- Click and trace over one of the contours. When you are finished, double click or press ENTER on the keyboard.
- In the Enter Object Data dialog, enter the Z value of the contour line as the Primary attribute value.
Enter the Z value of the contours as the Primary attribute value. |
- Click OK.
- Repeat so that all the contours are digitized.
- Press ESC on the keyboard to exit digitizing mode.
All the hand drawn contour lines on this image were digitized as blue polylines. |
- 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.
The indicated polyline is in reshape mode. The vertices are so close together, that you cannot discern them individually. |
- Select all the polylines in the project.
- 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:
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. |
- 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.
- 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.
- 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:
- Click Grid | Data, select the data file exported above and click Open.
- In the Grid Data dialog,
- Select Kriging as the gridding method.
- 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.
- Click OK and the grid file is created.
- Click Home | New Map | Contour Map, select the grid file and click Open.
- 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.
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). |
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!
Updated March 16, 2018
Comments
Please sign in to leave a comment.