Global Mapper Pro

How to combine two overlapping DTMs

Hello Everyone!

I have two DTMs that quite overlaps with each other on their edges.

Both DTMs have sort of invalid data after some point on their edges.

However, on the overlapping part at least one of the two DTMs have a valid elevation data.

How can I combine these two DTMs removing invalid data and merging both into a single DTM?

If at some points within the overlapped both DTMs have a valid elevation data, I would like to use an average value.

I don't think there could be gaps, but it is OK to fill them in with an interpolated data.

I would appreciate any help on this.



  • Both DTMs (No. 3 and 4)  are in this shared Dropbox folder: 
  • I'd like to elaborate a bit on this and throw some ideas.

    1) Ideally the stitching line should pass at the crossing of two DTMs

    2) However, DTMs may NOT actually cross at all or at some coordinates within the overlapping zone. This may require scripting in order to identify valid elevation data. The data is invalid if the elevation remains the same (or within a specified range) in a square of 8 x 8 (or as specified). This will allow keeping only valid elevation data. Then an average of two valid elevations shall be used to generate a mid point inside the overlap

    3) It is important to avoid steps between DTMs so some interpolation may be required.

  • geomannie
    geomannie Global Mapper User Trusted User
    Hi Vusal

    What you have seems a tricky problem. I can think of two possible fixes.

    1) Can you get hold of the source data and regrid? If so, you try try regridding with different parameters to exclude the areas with null data. If gridding XYZ in GM, try selecting "tight" for the "Elevation Grid No Data Distance Criteria" (see image). However, GM does not contain very sophisticated gridding options and this may not work.
    2) For each grid, draw a polygon around the good data and export as new grids clipped to the polygon(s). This will exclude the bad data areas an making combining grids much easier. However, the edges of your polygons are very irregular and clipping by polygon creation will be a laborious task.

    Unless anyone has some better ideas?
  • Hello geomannie!

    Thanks for spending your time on my issue.

    The DTMs are GeoTIFFs and I have already gotten rid of the bad data.

    Now the trick is that I don't want to use the average value of two DTMs within the overlapping zone, I want to generate a Bezier-curved gradient between two DTMs.

    I am not sure if it is possible with GM at all. I still count on power of scripting ...

Sign In or Register to comment.