incorrect leg_distance entries if two stops are identical
karussell opened this issue · comments
If there are two identical stops the number of leg entries in the leg_distance (or leg_time) array will be incorrect because there is no separate edge created between these identical stops.
E.g. in RouteResourceClientHCTest.testWaypointIndicesAndLegDetails you can add new GHPoint(42.495611, 1.498368)
to the point list and there will be an error IndexOutOfBoundsException: Index 8 out of bounds for length 8
because the entry number of leg_distance
is 8 and not 9 as it should be:
assertEquals(9, path.getPathDetails().get("leg_distance").size());