# inconsistent elevation data when calculating elevation/slope stats for polygon

JSL
Global Mapper UserPosts:

**444**Trusted User
Hi, I calculated the elevation/slope stats for a large set of polygons, but when I crosschecked by using the attribute function to assign elevations to the points from the underlying terrain, I found a lot of mismatches--did a histogram on the entire dataset (17000+ points) and got the following:

percent difference.png

The majority of mismatches were -2% to 2% difference, but there were a few differences ranging up to 62%.

Thinking maybe it was the upscaled SRTM DEM that I used, I did an elevation/slope stat calculation for the same polygon using two different DEMs, one which was unfiltered SRTM straight from GM's connect tab, and one on the upscaled SRTM dem (500m). Both showed discrepancies between at least one of the spot elevations of the locations marked as the polygon minimum or maximum elevations, and the elevations for those same points calculated from the attribute function (see workspace).

I just need to know if this is an unescapable variance, because I won't be able to publish results based upon the elevation/slope stat calculation if that's so.

Thanks for any help.

percent difference.png

The majority of mismatches were -2% to 2% difference, but there were a few differences ranging up to 62%.

Thinking maybe it was the upscaled SRTM DEM that I used, I did an elevation/slope stat calculation for the same polygon using two different DEMs, one which was unfiltered SRTM straight from GM's connect tab, and one on the upscaled SRTM dem (500m). Both showed discrepancies between at least one of the spot elevations of the locations marked as the polygon minimum or maximum elevations, and the elevations for those same points calculated from the attribute function (see workspace).

I just need to know if this is an unescapable variance, because I won't be able to publish results based upon the elevation/slope stat calculation if that's so.

Thanks for any help.

## Comments

444Trusted User2,278What version of Global Mapper are you using?

Can you post an attachment of your data with a workspace file and a description of your workflow? Ideally, the data will include just a few features that exhibit the problem, and a few that don't, so I can attempt to reproduce the problem without having to work through 17,000 features. Thank you.

Cheers,

Bob

444Trusted UserThe workspace should contain three different DEMs and two copies of the same basin, one with max-mins calculated from straight-up SRTM, and the second from SRTM resampled to 500m.

I'm using the latest version of GM...thanks for any help.

2,278I got the data, but it is not clear to me what you did and what you are seeing as the problem.

First, the workspace refers to a couple of GeoTIFF files that you did not include. If they are important to your workflow, please attach them. If they are too large, I can give you access to our FTP site.

Second, I will need a more detailed list of the steps that were included in your workflow. Does the workspace contain data that is the input to your process or the output (or both)? I would like to be able to have your input data, then follow your workflow to produce the output data that illustrates the problem. Thanks.

Cheers,

Bob

444Trusted UserYou should also be able to apply the following workflow to any polygon created on a DEM surface.

My workflow was as follows:

1) I selected the basin, then right clicked, selected "Analysis/Measurement," and chose "Calculate elevation/slope stats" and entered "yes" when it asked if I wanted to calculate minimums and maximums.

2) Once the minimum and maximum points were generated, I selected them, then right clicked "Attribute/Style Functions" and chose "Apply elevations from terrain to selected features" and entered "No, assign directly as new values."

What I found was that the elevation values calculated from step 2 did not match the elevation values calculated from step 1.

Thanks for your help.

2,278Thank you for the additional information. I was able to reproduce the problem, and have opened bug #15056 to track the resolution. I will post a message when it has been fixed.

It appears that the min/max point is not snapped to the center of a pixel, and, as a result, when Global Mapper uses that location to read the elevation while creating the attribute, some interpolation gets applied to the elevation value.

Cheers,

Bob

444Trusted User