logo separator

[mkgmap-dev] HGT - getElevation()

From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Jan 10 11:12:40 GMT 2018

Hi Frank

what problem do you see when we interpolate data? What is the advantage of voids?

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Frank Stinner <frank.stinner at leipzig.de>
Gesendet: Mittwoch, 10. Januar 2018 10:53:44
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] HGT - getElevation()

Hi Gerd and Andrzej,

> your choice of triangle is arbitrary.

of course, but the version with 4 triangles isn't.

> bilinear interpolation seems better

Yes. It's a little bit more to calculate, but better. For our special case it is:

h = h11 * (1 + y * x - x - y) + h21 * (x - y * x) + h12 * (y - y * x) + h22 * y * x

(h11 is left-bottom in coordinate origin, the horizontal and vertical distance is 1)

If your java-class have to much overhead, you can use this formula.


By the way, i would be very defensive with interpolation in the case of missing values. The hgt values are only interpolated values from original measurments. I would not interpolate values in the near of missing values. That give us a nice but unreliably picture.


Frank


More information about the mkgmap-dev mailing list