Global Mapper v24.1

change multiple feature vertices elevations with updated values

Treebeard Global Mapper UserTrusted User

I exported a csv file form a feature line with my distance and elevation data, opened, charted and fit a polynomial best fit line to the data in Excel. I now want to use the equation based data to update all of the vertex elevations of my feature line. I do not want to edit these one vertex at a time, would take way to long. Would be awesome if this was a copy - paste exercise to overwrite my per-vertex elevations with the equation based values. Can someone share a workflow with me to accomplish this.



  • Treebeard
    Treebeard Global Mapper User Trusted User

    Here is the profile data in excel, I want to replace the per vertex elevations with the values from the polynomial best fit. The x data stays the same, I just need to update the y data (elevataions)

  • Treebeard
    Treebeard Global Mapper User Trusted User

    Any help - thoughts would be appreciated.

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    While there isn't a way to apply a polynomial best fit inside the UI for Global Mapper, if you have Global Mapper Pro, you can use Python scripting to manually set the per-vertex elevations for a feature.

    You would use the gm.SetLineFeaturePointListEx call to update the per-vertex elevations of a line feature from inside a Python script.

    See for information (and examples) on using Python in Global Mapper.



    Global Mapper Guru

  • HI Treebeard,

    I have asked the same question previously and think it would be awesome if you could modify the elevation or Z values of vertices in the exported .csv file externally, say in Excel, and then copy and paste back into the "Feature Vertex List" in GM.

    A workaround I use for linear/straight grade design profiles (and long, complex design profiles that I break down into multiple, shorter linear sections) is to modify the elevations at the start/end vertices of each linear section with the required design elevations, then select them in the "Feature Vertex List", right click and select "Evenly Spread Elevations Between First and Last Elevation" and GM will interpolate and infill the elevations at the intervening vertices. This is really powerful and saves a lot of effort!

    As I say this works perfectly when you have a linear or straight grade profile (i.e. y=mx + c). For your non-linear/exponential relationship above (i.e. y = ax2 + bx +c) you could try breaking it into multiple, shorter linear sections and do what I suggest above. If its a road profile, it will likely be designed and built with sections of straight grade linked with multiple vertical curves in any event.

    Please feel free to DM me via this site (@CarrickCon) if you need more help with this, as I frequently do this in GM.