Changeset 17430 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2021-01-02T09:37:50+01:00 (3 years ago)
Author:
GerdP
Message:

fix #20330: Crossing landuse=residential and natural=water should not produce a warning

  • ignore crossing ways when one is landuse=residential and the other is natural=water or landuse=reservoir

(both should be implemented in mapcss rules if wanted)

  • add unit test
File:
1 edited

Legend:

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

    r17400 r17430  
    119119            if (isBuilding(w1) && isBuilding(w2))
    120120                return true; // handled by mapcss tests
    121             if (((isResidentialArea(w1) || w1.hasKey(BARRIER, HIGHWAY, RAILWAY, WATERWAY)) && isResidentialArea(w2))
    122              || ((isResidentialArea(w2) || w2.hasKey(BARRIER, HIGHWAY, RAILWAY, WATERWAY)) && isResidentialArea(w1)))
     121            if (((isResidentialArea(w1) || w1.hasKey(BARRIER, HIGHWAY, RAILWAY, WATERWAY) || isWaterArea(w1))
     122                    && isResidentialArea(w2))
     123                    || ((isResidentialArea(w2) || w2.hasKey(BARRIER, HIGHWAY, RAILWAY, WATERWAY) || isWaterArea(w2))
     124                            && isResidentialArea(w1)))
    123125                return true;
    124126            if (isWaterArea(w1) && isWaterArea(w2))
Note: See TracChangeset for help on using the changeset viewer.