graphhopper icon indicating copy to clipboard operation
graphhopper copied to clipboard

Bugs in HeightTile and HeightTileTest

Open wltrr opened this issue 3 weeks ago • 0 comments

Describe the bug When implementing a new DemProvider, I found some bugs in HeightTile and HeightTileTest:

  • In HeightTile, the precision field is in fact for the inverse precision. In the HeightTileTest, 1e-6 was used as precision, leading to an ineffective test.
  • In the getHeight method of HeightTile, the relative coordinates of the requested coordinates are computed using Math.abs(). This means that the HeightTile that is meant for (0,10) x (0,10) would return a height for (-10, 10) x (-10,10). I don't think this was desired behaviour.

On the other hand, the HeightTileTest had some tests that in my opinion should expect an Exception. I am not sure what the original intention of these tests were so maybe it would be good to double check that.

wltrr avatar Dec 09 '25 17:12 wltrr