Global Mapper v25.0

Smooth contour lines which do not cross

hover Global Mapper UserTrusted User
From a high-quality DEM (GSD around 3 cm) I try to generate nicely looking contour lines, 1m (intermediate) and 10m (major). The lines should look smooth, therefore I enabled "Smooth contour lines/areas to improve appearance". I also set the simplification factor pretty low, to 1.0.

The result are contour lines still looking pretty jagged but, even more of a problem, some contour lines cross each other. The same happens if I smooth the line features after generation, of course. Since every line is processed independent of its neighbours (lines), it may happen that lines cross each other.

How can I create nicely/smooth looking contour lines not crossing each other?
Are there any improvements in this area with Global Mapper 19?

PS: Currently using Global Mapper 18.2.0 


  • Mykle
    Mykle Global Mapper User Trusted User
    Have you looked at the DEM surface, using hillshading and elevation shading for example?  It is possible that a terrain that is uneven on a scale similar to the datapoint spacing of the DEM will have problems with contours.  As your contour interval increases, the contour line behavior becomes more acceptable. 

    You should be able to observe contour lines reflecting the nature of the elevation data, looking at the local variation in the values as well as the density of the data points. 

    If your DEM is not on a regular grid, it may help to export a regular grid of elevation data.  Import that data file for further work, which will provide some smoothing and help with contour generation.  You will need to experiment with different spacing values for the data export to see what values work best. 

    Again, look at the elevation surface display to guide your further processing towards generating acceptable contours. 

  • hover
    hover Global Mapper User Trusted User
    My elevation data looks ok, as far as I can judge.

    I will provide an example with smoothed contour lines crossing each other, I think that's how it should be or am I missing something?
  • Mykle
    Mykle Global Mapper User Trusted User
    The DEM would be more interesting.
  • hover
    hover Global Mapper User Trusted User
    Maybe, yes. But...

    If contour lines cross each other, it shows existence of overhanging cliffs or a cave, correct?
    While overhangs can be represented in point clouds, they can not be modeled in a grid DEM, right?

    My conclusion: If contours generated from a DEM cross each other, this is an issue which has nothing to do with the DEM itself but maybe with Global Mapper's approach how to smooth line features.

    Am I completely wrong?
  • Mykle
    Mykle Global Mapper User Trusted User
    "It's complicated"

    It depends upon your DEM.

    MOST DEM will not include overlaying topography, just the highest surface.  A point cloud is not a DEM (surface) but a collection of potentially dense points that may have a variety of elevations of reflected surfaces.  Trees for example.  So we "classify" points and work with sets of related points.  Contouring the point cloud (if you could) will really be an abstract result.  We are not talking about 3D objects, but a 2.5D surface. 

    A contour is simply a line following points interpolated at one elevation value.  The density of the DEM determines how much data a program has to work with.  There can be a lot of wiggle room between points while drawing and smoothing the curve of a contour line.  The contour interval that is reasonable is dependent upon the DEM.  If the DEM is a regular grid, contours will be more regular than a "DEM" of irregularly spaced points/cells. 

    I did say "It's complicated".  It is perfectly reasonable to create contours that overlap, even though they don't reflect the surface that well.  Any interpolation or extrapolation is just a best fit of data.  There are choices that must be made of parameters used to draw contours. 

    That usually means that you need to really understand the character of your elevation surface data when extracting information (like contour lines). 

    I have played a lot with contouring geophysical data.  Some data are regularly spaced, some not.  Some are aligned in a vertical direction, horizontal, or at some angle.  Some data were acquired with one geometry or another.  I usually have to grid the data before it can be contoured (few contouring algorithms use point data rather than gridded data).  So I usually have to interpolate in a variety of directions to generate a contour-able surface.  And we haven't mentioned irregular "edges" of the "elevation" surface, let alone holes.  So yes, you can wind up with a rats nest of contours. 

    I have rambled a lot with this response.  It depends upon your DEM.  It depends upon the data you start with. 

    If you are able to provide your DEM (or even earlier set of data) it will likely be next week before I could look at it.  But I think that your data set will illuminate your issues, and perhaps suggest what options you may have. 
  • TRB426
    TRB426 Global Mapper User
    I do a lot of contouring of my drone collected point clouds with similar GSD levels - 2 to 5 cm.   I have found, through many, many trials and errors that creating a grid at about a 2 foot (0.6 M) yields contours that look fairly smooth but still respect breaklines like curbs, etc.