3D Measurements
gearfreak
Global Mapper User
Mike,
You recently provided me with a build that allowed the selection of two line vertices to get a 3D measurement between them. I've found it extremely helpful; however, if I draw a line by selecting vertices and then compare the measurements of the original line and the newly traced line, they are different. Perhaps you can take a look and see if there's a glitch in the Haversine formula.
You recently provided me with a build that allowed the selection of two line vertices to get a 3D measurement between them. I've found it extremely helpful; however, if I draw a line by selecting vertices and then compare the measurements of the original line and the newly traced line, they are different. Perhaps you can take a look and see if there's a glitch in the Haversine formula.
Comments
-
How large is the difference? Note that the distance reported for a full line will just be the 2D distance, not the 3D distance as the status bar text displays in the Digitizer Tool, so if your feature has per-vertex elevations you will see a difference.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
I sellected the vertices between two waypoints and measured approximately 2,600' 3D in the status bar ( I don't recall exactly). I then traced from one vertex to the other on the same path, snapping to intermediate vertices and measured approximately 2,900' 3D. If I display the feature attributes of the new line it shows me the 2D measurement, just like the measure tool. 300' in half a mile isn't much until you're measuring the 2,179 mile Apppalchian Trail.
-
I'll take a look with a sample and see if I can reproduce what you are seeing, or if you can provide your lines (both the original and the digitized ones that report different distances), that would be helpful.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Here is a small line sample with the DEM. I broke off a piece of the GPX I had imported, then traced vertex to vertex. You can see the difference by selecting and comparing the endpoints.
-
The GPX file didn't exist in your .zip file, but there was a line segment there. When I viewed the length of a portion of that (from vertex 1 to 4) the reported 3D length was 350.71 ft. I then split the line on the 4th vertex and selected the first and last vertex of that line with the Digitizer Tool and again 350.71 ft was reported for the 3D length. The Feature Info tool reports the length of the feature as 297.18 ft, but keep in mind this is the 2D length of the feature and does not take the terrain into account like the 3D length reported on the Digitizer Tool status bar does.
Does this explain what you are seeing?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Mike,
There should have been two line segments. The one from the original GPX was 5 segments long, the four segment line is the one I traced. Check the layers if you would to be sure.
What I'm seeing is a difference in the 3D distance of the GPX I've imported and any traced line between the vertices of that GPX. The length difference is apparent when comparing measurements between corresponding vertices of each line. It's as if the traced line is picking up a different elevation and therefore it's always longer in my tests. I'll double check my zip file to make sure you have everything you need. Thanks for looking!
Ray -
Ray,
The GPX file was not in your sample. I think what might be happening is that your line feature from the GPX already has per-vertex elevations, so for the 3D calculation of the length of that line those elevations are used. When you trace a new line you would just have a new 2D line, so for the 3D length calculation of that traced line the underlying terrain would be used to calculate the 3D length, hence the difference.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
global_mapper wrote: »I think what might be happening is that your line feature from the GPX already has per-vertex elevations, so for the 3D calculation of the length of that line those elevations are used.
You may be on to something there, Mike. I used the imported .GPX to generate points every 100 feet for the length of the line, applied elevations to the points, exported points as a .CSV and then imported the xyz .CSV to recreate the line with equal vertex spacing. Is it possible that these vertices don't accurately reflect the elevation from the underlying DEM?
I'm assuming the 3D distance is calculated along each segment of the length of the selected line between the start and end points, correct? -
It is pretty common for a GPX file to already have elevation values for each vertex recorded from the GPS device that the GPX was created from. This could certainly be different than what the DEM shows, such as if the GPS device was not on the surface, or just because the GPS device may have better or worse accuracy than the DEM. So if some of the measurements came from the GPX elevations and others from the DEM, then there would be some difference.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
If you read my post with regard to how the vertices were created, you'll see that the GPS data is irrelevant.
-
In the GMW file that you provided me there is only a single 2D line with 6 vertices and the underlying DEM. Of course the GPX file is referenced as well, but wasn't provided so I can't check it. Do you have something that has the two lines in it, one that is complete and the other traced where you get the two different measurements so that I can test it? Whenever I do the trace manually I get the same results as measuring between vertices on the line that I trace.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Mike,
I just downloaded the .zip file I gave you to look at. When I open it with GM and go to the Overlay Control Center, the visible layers are the Shelburne, NH-ME DEM, ME.gpx and Digitized Line. ME.gpx is a small segment I separated out for testing. It measures 503.37' in 3D. Digitized Line was traced over the .gpx, vertex to vertex, and measures 568.83' in 3D. I've attached the .gpx and hopefully you can determine the difference I'm getting. Thanks again!
Ray -
Ray,
With the GPX file I was able to see the difference and find the problem (an extra unit conversion was being done on the digitized line that didn't already have elevation values associated with it). I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with this fixed for you to try. Simply download that file and extract the contents into your existing v11.xx installation folder to give it a try. If you are using the 64-bit version, there is a new build available at http://www.globalmapper.com/global_mapper11_64bit.zip .
Note there is still a tiny difference in the values due to the difference in precision of the elevation values written to the GPX file and the full precision values coming from the loaded DEM layer for the digitized line.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Thanks for resolving this, I thought I was going crazy! I really appreciate the prompt resolution to this issue.
-
This fix also appears to have fixed an issue with slope calculations being twice what they should be. Thanks again!
Categories
- 12.8K All Categories
- 5.7K Features Discussion
- 345 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 636 GM Script Language
- 54 User Scripts
- 114 GPS Features
- 417 Projection Questions
- 826 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 178 Announcement and News
- 913 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 569 Other Discussion
- 131 GIS Data Sources
- 27 Global Mapper Showcase
- 238 How I use Global Mapper
- 107 Global Mapper Forum Website