How to digitize contour line in an efficient way
fgallice
Global Mapper User
in Raster Data
Hello everyone, I was wondering if there is an easy and fast workflow to digitize contour from a raster image without extracting the line from the image. I want to use the trace mode line and then convert the line to points with a contour value to be able to grid?
Answers
-
- Make sure you have assigned the elevations first then (Vertex Editing > Edit Feature Vertices)
- Select the lines
- Right-click
- Advanced Feature Creation Options > Create Point Features Spaced Along Selected Features
Alternatively, if you have reasonably clean contours you may be able to convert them to lines by creating area features based on the contour colour values and then converting those to center lines:- Right-click the raster layer
- Create Area Features from Equal Values in Selected Layer
- Choose Only Create Areas for Selected Colors and enter the RGB value of your contour e.g. 0,0,0 for black
- Select the newly created area features
- Right-click > Move/Reshape Feature(s) > SIMPLIFY
- Right-click > Move/Reshape Feature(s) > SMOOTH
- Right-click > Advanced Feature Creation Options > Create Area Skeletons/Center Lines
- Join any gaps in the new contour lines:
- Right-click > Crop/Combine/Split Functions > COMBINE
- Repeat steps 5 & 6 to reduce the points and smooth
This is an example I created using the above workflow - took around 10-15 minutes. Using the Image Swipe Tool I have shown the original raster on the right and the results of the process above on the left. The image below that shows the raster below the new contour lines.

Categories
- 13K All Categories
- 5.8K Features Discussion
- 350 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 421 Projection Questions
- 837 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 182 Announcement and News
- 943 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.8K Technical Support
- 581 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 245 How I use Global Mapper
- 111 Global Mapper Forum Website

