issue#572: filter out on_red turn restrictions

This commit is contained in:
Arndt Brenschede 2023-07-02 08:32:43 +02:00
parent cada37b4de
commit 1a2bb197d1

View file

@ -49,6 +49,7 @@ public class RestrictionData extends MapCreatorBase {
public boolean isValid() { public boolean isValid() {
boolean valid = fromLon != 0 && toLon != 0 && (restriction.startsWith("only_") || restriction.startsWith("no_")); boolean valid = fromLon != 0 && toLon != 0 && (restriction.startsWith("only_") || restriction.startsWith("no_"));
valid = valid && restriction.indexOf("on_red") < 0; // filter out on-red restrictions
if ((!valid) || badWayMatch || !(checkGeometry())) { if ((!valid) || badWayMatch || !(checkGeometry())) {
synchronized (badTRs) { synchronized (badTRs) {
badTRs.add(((long) viaLon) << 32 | viaLat); badTRs.add(((long) viaLon) << 32 | viaLat);