Following Version of HighResolutionTerrain seems to have bug when intersecting
@version $Id: HighResolutionTerrain.java 1970 2014-04-29 00:45:11Z
The line between following Positions do not return intersections, though they intersect with the terrain and have no direct line of sight
Position.fromDegrees(47.8790633, 14.7687356, 30) (Hirschkogel, 1092m, Austria)
Position.fromDegrees(47.776733, 13.432126, 5) // Schafberg,
The bug was detected with LineOfSight Demoapplication using Schafberg es Referencepoint and
Hirschkogel as single Grid point.
The bug got obvious when Application did not render intersection points, but the Visibility of the sightline was correctly rendered by OpenGL.
Reason for the bug is, that the selection of tiles along the line of sight is done wrong.
Tiles are selected along a loxodrome between both points, correctly it should be done along an orthodrome.
So the algorithm does not return an intersection because the selected tiles do not lie below the line of sight.
The attached screenhot proves this.
I fixed the bug with splitting up the line into smaller peaces and calculating intersections piece for piece.
regards.
Michael
@version $Id: HighResolutionTerrain.java 1970 2014-04-29 00:45:11Z
The line between following Positions do not return intersections, though they intersect with the terrain and have no direct line of sight
Position.fromDegrees(47.8790633, 14.7687356, 30) (Hirschkogel, 1092m, Austria)
Position.fromDegrees(47.776733, 13.432126, 5) // Schafberg,
The bug was detected with LineOfSight Demoapplication using Schafberg es Referencepoint and
Hirschkogel as single Grid point.
The bug got obvious when Application did not render intersection points, but the Visibility of the sightline was correctly rendered by OpenGL.
Reason for the bug is, that the selection of tiles along the line of sight is done wrong.
Tiles are selected along a loxodrome between both points, correctly it should be done along an orthodrome.
So the algorithm does not return an intersection because the selected tiles do not lie below the line of sight.
The attached screenhot proves this.
I fixed the bug with splitting up the line into smaller peaces and calculating intersections piece for piece.
regards.
Michael