Changeset 17447 in josm


Ignore:
Timestamp:
2021-01-07T11:05:39+01:00 (2 weeks ago)
Author:
GerdP
Message:

fix #20352: Incorrect validation warning on waterway crossing of adjacent water areas
Commit 20352.patch to

  • treat waterway=riverbank as water area
  • ignore crossing waterways and water areas
File:
1 edited

Legend:

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

    r17430 r17447  
    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
     
    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
Note: See TracChangeset for help on using the changeset viewer.