Changeset 3190 in josm


Ignore:
Timestamp:
Apr 16, 2010 10:29:40 PM (3 years ago)
Author:
stoecker
Message:

fixes #4080

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java

    r3083 r3190  
    6666        new PrefixSuffixSwitcher("left", "right"), 
    6767        new PrefixSuffixSwitcher("forward", "backward"), 
    68         new PrefixSuffixSwitcher("forwards", "backwards") 
     68        new PrefixSuffixSwitcher("forwards", "backwards"), 
     69        new PrefixSuffixSwitcher("up", "down"), 
    6970    }; 
    7071 
    7172    private static ArrayList<String> reversibleTags = new ArrayList<String>( 
    72             Arrays.asList(new String[] {"oneway", "incline"})); 
     73            Arrays.asList(new String[] {"oneway", "incline", "direction"})); 
    7374 
    7475    public static boolean isReversible(Way way) { 
     
    120121                    newValue = OsmUtils.reverseval; 
    121122                } 
    122             } else if (key.equals("incline")) { 
     123            } else if (key.equals("incline") || key.equals("direction")) { 
    123124                PrefixSuffixSwitcher switcher = new PrefixSuffixSwitcher("up", "down"); 
    124125                newValue = switcher.apply(value); 
     
    130131                    newKey = prefixSuffixSwitcher.apply(key); 
    131132                    if (!key.equals(newKey)) { 
     133                        break; 
     134                    } 
     135                    newValue = prefixSuffixSwitcher.apply(value); 
     136                    if (!value.equals(newValue)) { 
    132137                        break; 
    133138                    } 
Note: See TracChangeset for help on using the changeset viewer.