Ticket #20352: 20352.patch

File 20352.patch, 1.3 KB (added by GerdP, 7 weeks ago)
  • src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java

     
    128128            if (w1.hasKey(RAILWAY) && w2.hasKey(RAILWAY) && w1.hasTag(RAILWAY, "yard") != w2.hasTag(RAILWAY, "yard")) {
    129129                return true; // see #20089
    130130            }
    131             return (w1.hasTag(WATERWAY, "river", "stream", "canal", "drain", "ditch") && w2.hasTag(WATERWAY, "riverbank"))
    132                     || (w2.hasTag(WATERWAY, "river", "stream", "canal", "drain", "ditch") && w1.hasTag(WATERWAY, "riverbank"));
     131            return (w1.hasTag(WATERWAY, "river", "stream", "canal", "drain", "ditch") && isWaterArea(w2))
     132                    || (w2.hasTag(WATERWAY, "river", "stream", "canal", "drain", "ditch") && isWaterArea(w1));
    133133        }
    134134
    135135        @Override
     
    314314    }
    315315
    316316    static boolean isWaterArea(OsmPrimitive w) {
    317         return w.hasTag("natural", "water") || w.hasTag(LANDUSE, "reservoir");
     317        return w.hasTag("natural", "water") || w.hasTag("waterway", "riverbank") || w.hasTag(LANDUSE, "reservoir");
    318318    }
    319319
    320320    static boolean isHighway(OsmPrimitive w) {