Global Mapper v26.0

How to "transfer" elevation values across break in contours???

Hi GM'ers,

A bit of a puzzle here for a Friday afternoon!

Its a long story, but I'm working with a historic contour set which was originally presented in 16 tiles (4x4), some of which are elevated and others which are not. I had hoped that I could "transfer" the elevation values across the tile divide but can't figure out a simple way to do it?

For example, if you look at screenshots below of the 5 m contour set you will see that in the first one the contours are elevated (in this case Elevation = 55m), while in the second screenshot the Elevation = 0m. I had hoped that if I used the "Combine Line Features Tool" that the elevation value from the first line would carry across to the second, but all that happens is I end up with a continuous line with an elevation value on "0,55" i.e. both elevations!

I could manually modify each zero elevation contour line before joining but there's hundreds of lines to do and that is just the 5m set, never mind the 2.5m and 1m contour sets...

Any and all help much appreciated.

Cheers,

/al

P.S. I also tried the MATCHPROP command in AutoCAD thinking that would do it, but sadly no joy! 😕


Tagged:

Best Answer

  • CarrickCon
    Answer ✓

    Hi @tikhpetr,

    I figured out a way to do it and you put me on the right track with the Attribute Editor, so many thanks to you!

    As shown in screenshots below, first I join the elevated and non-elevated contour lines using the "Combine Line Features Tool" and end up with combined lines with elevations line "45,0" "50,0" "55,0" etc. Then I do a Search and Replace on ",0" and hey presto! All the ,0 values dissappear and I have combined contour lines at the correct elevation. Simple when you stop and think about it.

    Thanks for your help,

    Alistair.


Answers

  • BTW - I'm using the basic version of GM 25.1 (not the PRO version) if that makes any difference...

  • As always, pictures:


  • Hi @tikhpetr,

    Thanks for your suggestion but I think you may not have fully understood what I'm trying to do, or I may not have understood your solution?😯

    If you look at the dxf in the attached zip folder (its to a local site datum, but should open in any planar coordinate system) and shown in my screenshots above, you will see that I have a clipped 5 m contour set that has been cut into 4 tiles. In one of the tiles (NW) the contours are elevated and in the other three tiles (NE, SE and SW) they are not elevated. I'd like to combine the contours into a single elevated data set and I was asking if there is some way of transferring or copying the elevation from the NW tile to the others?

    I'm sure there is a workaround in GM without manually having to select and modify each and every contour line, but I just can't figure out how to do it...?

    Ta,

    /al


  • Hi!

    My English is far from perfect!)) Can one tile be opened as a separate layer? If yes, my option is suitable. Maybe..))

  • Perhaps you can provide a link to your file? That would make it easier to discuss.

  • You can also convert your reference contours to points, and then use Copy attributes between overlapping/nearby features to transfer the ELEVATION attribute values across. You will need to export the updated contours to say a shapefile and re-import to apply the heights to the contours.

    I tried the method you mentioned and I ended up with two to three different elevation values for one contour with none of them being 0. Might be a mistake on my part of course.

  • Hi Steve,

    I've attached a package file so you can use the same data and here's what I did step by step (see screengrabs below numbered according to steps):

    1 - ID elevated 5m contours on LHS of tile boundary (shown in green).

    2 - ID non-elevated 5m contours on LHS of tile boundary (shown in black).

    3 - Drag and select a corridor where the contours meet and use Combine Lines Tool to join with 1 m max spacing (could use zero I guess if contours meet exactly at same point).

    4 - Select the Combined Lines layer just created and right click to pull up Layer Attributes. You will see that elevations of combined lines are 0,100, 0,105, 0,110 etc. Right click and do a search and replace on "0," and replace with "blank".

    5 - Hit okay and you will see that combined lines are now correctly elevated.

    6 - ID elevated combined contours shown in red.

    Please note that this method only works along tile edges where contours start/finish and obviously won't work on "internal" contours which sadly have to be manually edited. I work from the "seed" tile (i.e. the one with the elevated contours) to the surrounding tiles along vertical and horizontal tile boundaries until the whole data set is elevated.

    I used this recently on a large ~50 km x 50 km data set on very steep terrain and it automatically converted about 75% of the contours in one go, so I was stoked!

    Hopefully you get it to work. Let me know how you go.

    Cheers,

    /al