graphhopper
graphhopper copied to clipboard
Bugs in HeightTile and HeightTileTest
Describe the bug
When implementing a new DemProvider, I found some bugs in HeightTile and HeightTileTest:
- In
HeightTile, theprecisionfield is in fact for the inverse precision. In theHeightTileTest, 1e-6 was used as precision, leading to an ineffective test. - In the
getHeightmethod ofHeightTile, the relative coordinates of the requested coordinates are computed usingMath.abs(). This means that theHeightTilethat 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.