Global Mapper v25.0

How to calculate new attribute from geometry

I have generated a grid of points that have elevation values and want to calculate the UTM scale factor for each of these points. The data is currently in Lat/Long, but I think I can figure out how to do a spatial filter to extract the data in the specific UTM zone I am working in (Longitude between 79 and 84 west). The formulae requires the elevation and the UTM Easting (X) value. Once I filter my data, how do I convert it to a format that includes the coordinates as attributes so that I can do the calculation?

Best Answer

  • DerrickW
    Answer ✓

    Hey Ron,

    This post is a few weeks old and I'm not sure if you already figured out how to do this. If not, here's how you add X & Y (of your current project coordinate system) to your features:

    As a habit, you should also copy your "ELEVATION" attribute to a new field. Usually, I'll copy it to something like "NAVD88z", then calculate the geoidHeight and ellispoidal height, adding each of those to another attribute. Typically, I add everything I need as an attribute, export to a CSV and do what I need in Excel, then import the CSV back in (or JOIN it to my existing layer).

    If you want to JOIN the CSV and bring it back in, it's not a bad idea to calculate an attribute using <index in layer> first. As long as you just have one point layer you're working with, that's a way to make sure you are joining the excel calcs using a unique number.


  • Thanks - this was very helpful. I sometimes forget that additional options appear in menus when objects are pre-selected. I ended up doing the work in FME but that version contained an error so I reprocessed it with GM using the method you described.

    A side issue I had was that my data was in pointcloud format and the options to calculate attributes are not available then. I worked around this by exporting the data to a simple points file and doing the processing on that.

  • Glad it worked for ya!

    Unrelated - I'm part of the survey group over here, too. Just finished a quick script to check our surfaces against control points in GM (drone surface, TIN from CAD, USGS 3DEP, whatever). You're welcome to try it out if you want. Right now it just calculates the Z delta for each point. Once I figure out how to split it up by point code (control / check veg / check bare) and summarize with RMSE & Std Dev, I'll post the script in the user scripts forum.

  • Example output, along with a CSV

  • Looks like a great tool. I have never written any scripts with GM before so this is all over my head (yes - that was a "dad" survey joke.)

    One of the ways I was thinking of checking my surface was to extract a centroid point and average scale factor from the many survey files we have here and comparing it to the surface. I think your script may make that easier.

  • Not sure I'm following. The script I posted above will sample a raster surface's elevation and calculate the delta between the survey elevation and raster surface elevation at those XY coordinates, displaying a delta. Normally, this is something I use while building surfaces from photogrammetry and Lidar. Once it passes qaqc, I generate a TIN, do another QAQC on that (which still involves creating another derivative raster surface), then kick it out the door.

    If you're doing something like creating a TIN in CAD and just want to use global mapper (and my script) to quickly check your TIN surface, you can do that as well and shouldn't need to apply a scale factor. I assume your imported control and TIN would already have that scale factor applied and if you're just doing checks, I don't personally think it would be important. Maybe you feel differently, especially if you're working on very large sites.

    Something else I do is take a survey TIN and compare it to USGS 3DEP surfaces, just as a quick quality check on our survey surfaces. I don't hold the 3DEP layer as gospel, but it's a very quick check and can call attention to areas where a breakline might have been missed or something. That's a surface-to-surface comparison, and I just posted a script for that in the user script forum a week or two ago.

    Anyways, feel free to track me down on linkedin and send a CSV or something if you'd like me to try real quick (depending on what you're trying to do).

    Global Mapper has become wildly useful to us here in my office for this kind of thing. It takes about 2 minutes to check thousands of field shots against 3DEP and makes it really damn easy to find a rod bust (and the point range it occurred in).

  • Also - Your webmap is -awesome-. You just made 2x drafter's heads explode.