Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.4.5
-
Component/s: referencing
-
Labels:None
-
Environment:winxp, java 1.5.0_11
-
Testcase included:yes
Description
When computing a geodetic curve the distance between the points on the curve is wrong.
The problem seems to be in the method "getGeodeticCurve(final int numberOfPoints)":
deltaDistance (distance between steps) = distance / (numberOfPoints+1)
loop: for (int i = 1; i < numberOfPoints; i++)
the last point before the destination point is not calculated or the distance between the points is to short
current curve (numberOfPoints = 3):
o--o-o-----o
correct curve (extend deltaDistance to distance / numberOfPoints):
o---o--o---o
or (add one extra point with running to loop one more time (for (int i = 1; i <= numberOfPoints; i++)):
o--o-o-o--o
Confirmed the issue and fixed in trunk and 2.5.x.
Note: changing the loop end condition provokes a unit test failure on an assert with a cryptic (to me) comment from Martin. Changing the deltaDistance calculation works.