We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEM.Net/DEM.Net.Core/Services/Interpolation/HyperbolicInterpolator.cs
Line 44 in 168cd8e
If x is from west to east and y is from north to south, then (0,0) point should be at NW, not SW
The text was updated successfully, but these errors were encountered:
Hi @g0ro, thanks for reporting this. Can you submit a test case for that ? Which data set did you use ?
Sorry, something went wrong.
It does not depend on a dataset. HyperbolicInterpolator's y is just inversed compared to BilinearInterpolator. The later seems to be right.
To test it, we may get height values of corner points, they should be the same:
private static void TestInterpolators() { var iplBl = new BilinearInterpolator(); var iplHb = new HyperbolicInterpolator(); for (var x = 0; x<=1; x++) { for (var y = 0; y <= 1; y++) { var hBl = iplBl.Interpolate(1, 2, 3, 4, x, y); var hHb = iplHb.Interpolate(1, 2, 3, 4, x, y); Console.WriteLine($"x={x} y={y} hBl={hBl} hHb={hHb}"); } } }
But the result is inverted:
x=0 y=0 hBl=3 hHb=1 x=0 y=1 hBl=1 hHb=3 x=1 y=0 hBl=4 hHb=2 x=1 y=1 hBl=2 hHb=4
OK thanks for pointing this out. Will fix it
xfischer
No branches or pull requests
DEM.Net/DEM.Net.Core/Services/Interpolation/HyperbolicInterpolator.cs
Line 44 in 168cd8e
If x is from west to east and y is from north to south, then (0,0) point should be at NW, not SW
The text was updated successfully, but these errors were encountered: