Changeset 15515 in josm


Ignore:
Timestamp:
2019-11-05T22:31:25+01:00 (7 months ago)
Author:
Don-vip
Message:

fix #18293 - handle level tag like layer in CrossingWays test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java

    r14813 r15515  
    2727
    2828/**
    29  * Tests if there are segments that crosses in the same layer
     29 * Tests if there are segments that crosses in the same layer/level
    3030 *
    3131 * @author frsantos
     
    107107            if (w1 == w2)
    108108                return false;
    109             if (!Objects.equals(OsmUtils.getLayer(w1), OsmUtils.getLayer(w2))) {
     109            if (areLayerOrLevelDifferent(w1, w2)) {
    110110                return true;
    111111            }
     
    252252        @Override
    253253        boolean ignoreWaySegmentCombination(Way w1, Way w2) {
    254             return !Objects.equals(OsmUtils.getLayer(w1), OsmUtils.getLayer(w2));
    255         }
    256 
     254            return areLayerOrLevelDifferent(w1, w2);
     255        }
    257256    }
    258257
     
    393392    }
    394393
     394    private static boolean areLayerOrLevelDifferent(Way w1, Way w2) {
     395        return !Objects.equals(OsmUtils.getLayer(w1), OsmUtils.getLayer(w2))
     396            || !Objects.equals(w1.get("level"), w2.get("level"));
     397    }
     398
    395399    /**
    396400     * Returns all the cells this segment crosses.  Each cell contains the list
Note: See TracChangeset for help on using the changeset viewer.