Dynamic Elevation: Method of determining elevation using .hgt-Files

Started by Sonny, June 30, 2016, 18:25:08

0 Members and 1 Guest are viewing this topic.

Sonny

I'm experimenting in producing more accurate .hgt elevation files compared to the ones downloaded with Locus especially for mountain terrain in Austria.

For example there'e a mountain peak with true elevation=1206 m
The highest peak of this mountain in the original .hgt-file of Locus=1185 m
The highest peak of my new created .hgt-file of this mountain=1206 m

But now the strange thing: When using my new .hgt-file in Locus, the map show me a maximum of 1210 m at the location of the peak. How can this be, since the highest spot in the .hgt file is 1206 m and each point on the map should be <=1206 m?  :o
What method of filter is Locus using to calculate the high at the exact cursor's location out of the elevation-values around this location of .hgt-file?

Menion

Good day Sonny,

I'm computing elevation values in HGT files thanks to bicubic interpolation, so values may be higher then maximum value in the file.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Sonny

But how can it be that if a peaks' elevation-pixel of the .hgt file has an elevation for example of 1500 m.
And every elevation pixels around in a 4x4 raster (which are used for bicubic interpolation) are much meters lower.
So in my opinion just the map-pixel which is in the middle of the elevation pixel should have an exact altitude of 1500 m

Each map-pixel around should be lower, shouldn't they? Or am I wrong that the map-pixel which is exactly in the center of an elevation-pixel should have the same elevation values (1500 m). Or in other words: How can a map-pixel be higher than the highest elevation-pixel?

But maybe I'm not quite understanding bicubic interpolation, and I've to read some sites about this filter method in detail ;)

Menion

Hmm mystery for me is, how you made an HGT file, where your peak is exactly on one of 1200x1200 values (in case of 3'' file) that Locus use for interpolation?
BiCubic interpolation use nearest  16 values (4x4 grid) and compute spline curve over them so top point may be higher then all points in grid. This may happen for peaks. Same, just opposite may happen as well, so Locus may interpolate lower value then is lowest value of points in grid. I'm not at PC now, but I may find you some links if you will be interesting.

Sent from my SM-G930F using Tapatalk

- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Sonny

I'm using Global Mapper for the creation of the .hgt files. i can define any raster width i like. For my test-hgt for example I used 2200x2200 values which equals about 50m x 35m. (By the way: Does a .hgt file for use in Locus have to be same amount of rows and colums? Or is it possible e.g. to create files 1600 x 2200 - which equals about 50m x 50m - which suits much better to the original 10x10 m elevation files, which are free available for Austria.

Global Mapper has several options to resample the elevation values of the new, wider raster. One is: take the maximum elevation within a box of e.g 5x5 elevation pixel of the source file. So I can make sure that each maxiumum elevation of a peak is still in the new .hgt file for Locus.

But I have to see if this is really the best method now I know that Locus is adding some meters in altitude in the center. I have to take care the resampling method of Global Mapper as well as these of Locus to get optimum offline elevation files. Some tests following  ;)

Sonny

I just controlled bicubic interpolation using Global mapper. Same result here, also Global mappers maximum is even 1213 m for the 1206 peak. And funny detail: The 1213m maximum is at a position, where in the .hgt file the edge of the peak-pixel is about 50 meters away :o

I also looked at the result using bilinear interrpolation: Using this method, each map-pixel is <=1206 m

Just for interest: Is there a reason why bicubic is better for elevation files than bilinear?

Bicubic:
Original:
Bilinear:

Menion

Hi, nice tests,

linear interpolation consider only nearest four points. This means it do not take into compute real shape and results may never be higher then highest of these four points. Negative of this is that it completely remove all peaks and make them more "flat". Cubic interpolation use 16 points and shape is considered into compute, so we get a more precise values on edges, peaks etc.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •