Ignore:
Timestamp:
2016-11-14T23:32:57+01:00 (3 years ago)
Author:
Don-vip
Message:

see #10387 - Gibraltar and British Indian Ocean Territory are the only British territories driving on right side

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/RightAndLefthandTraffic.java

    r11252 r11256  
    4242public final class RightAndLefthandTraffic {
    4343
     44    private static final String DRIVING_SIDE = "driving_side";
     45    private static final String LEFT = "left";
     46    private static final String RIGHT = "right";
     47
    4448    private static class RLTrafficGeoProperty implements GeoProperty<Boolean> {
    4549
     
    109113        Collection<Way> allWays = data.getWays();
    110114        for (Way w : allWays) {
    111             if ("left".equals(w.get("driving_side"))) {
     115            if (LEFT.equals(w.get(DRIVING_SIDE))) {
    112116                addWayIfNotInner(ways, w);
    113117            }
    114118        }
    115119        for (Relation r : allRelations) {
    116             if (r.isMultipolygon() && "left".equals(r.get("driving_side"))) {
     120            if (r.isMultipolygon() && LEFT.equals(r.get(DRIVING_SIDE))) {
    117121                for (RelationMember rm : r.getMembers()) {
    118                     if (rm.isWay() && "outer".equals(rm.getRole())) {
     122                    if (rm.isWay() && "outer".equals(rm.getRole()) && !RIGHT.equals(rm.getMember().get(DRIVING_SIDE))) {
    119123                        addWayIfNotInner(ways, (Way) rm.getMember());
    120124                    }
     
    167171        Set<Way> s = Collections.singleton(w);
    168172        for (Relation r : OsmPrimitive.getParentRelations(s)) {
    169             if (r.isMultipolygon() && "left".equals(r.get("driving_side")) &&
     173            if (r.isMultipolygon() && LEFT.equals(r.get(DRIVING_SIDE)) &&
    170174                "inner".equals(r.getMembersFor(s).iterator().next().getRole())) {
    171175                if (Main.isDebugEnabled()) {
Note: See TracChangeset for help on using the changeset viewer.