
10 Jan
2018
10 Jan
'18
12:33 p.m.
Hi Frank and Gerd,
It's a little bit more to calculate
The actual code is quite simple, it is 3 times linear interpolation: double hxt = (1.0D - qx)*hlt + qx*hrt; double hxb = (1.0D - qx)*hlb + qx*hrb; return (1.0D - qy)*hxb + qy*hxt;
i would be very defensive with interpolation in the case of missing values.
I got the same feeling. The best way to fill voids is to process whole HGT. And I believe that DEM providers already have done it, so any attempt at simple extrapolation would rather add errors than make output better. In my code I preserve voids. If requested coordinates are near void HGT node, then returned value is void. -- Best regards, Andrzej