add conditions for restrictions via ways

This commit is contained in:
Kseniia 2021-01-07 12:15:51 +02:00
parent 0361b6b773
commit 2c802717a9

View file

@ -29,7 +29,7 @@ public class BinaryRoutePlanner {
protected static final Log log = PlatformUtil.getLog(BinaryRoutePlanner.class); protected static final Log log = PlatformUtil.getLog(BinaryRoutePlanner.class);
private static final int ROUTE_POINTS = 11; private static final int ROUTE_POINTS = 11;
private static final boolean TRACE_ROUTING = true; private static final boolean TRACE_ROUTING = false;
public static double squareRootDist(int x1, int y1, int x2, int y2) { public static double squareRootDist(int x1, int y1, int x2, int y2) {
@ -678,8 +678,7 @@ public class BinaryRoutePlanner {
} }
// Check if there is restriction only to the other than current road // Check if there is restriction only to the other than current road
if (rt == MapRenderingTypes.RESTRICTION_ONLY_RIGHT_TURN if (rt == MapRenderingTypes.RESTRICTION_ONLY_RIGHT_TURN || rt == MapRenderingTypes.RESTRICTION_ONLY_LEFT_TURN
|| rt == MapRenderingTypes.RESTRICTION_ONLY_LEFT_TURN
|| rt == MapRenderingTypes.RESTRICTION_ONLY_STRAIGHT_ON) { || rt == MapRenderingTypes.RESTRICTION_ONLY_STRAIGHT_ON) {
// check if that restriction applies to considered junk // check if that restriction applies to considered junk
RouteSegment foundNext = inputNext; RouteSegment foundNext = inputNext;
@ -687,8 +686,6 @@ public class BinaryRoutePlanner {
if (foundNext.getRoad().id == restrictedTo) { if (foundNext.getRoad().id == restrictedTo) {
break; break;
} }
foundNext = foundNext.next; foundNext = foundNext.next;
} }
if (foundNext != null) { if (foundNext != null) {