Ignore:
Timestamp:
2009-10-28T21:16:49+01:00 (15 years ago)
Author:
skela
Message:

JOSM validator: Ignore railway=tram when checking crossing ways.
Tram lines often cross each other without a junction.
Furthermore, Helsinki is mapped so that tram lines may cross highways
without a junction node. (There are junction nodes only for footways
and cycleways.) This modification will silence bogus warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/CrossingWays.java

    r17722 r18344  
    7474
    7575        String coastline1 = w.get("natural");
    76         boolean isCoastline1 = coastline1 != null && (coastline1.equals("water") || coastline1.equals("coastline"));
     76        boolean isCoastline1 = "water".equals(coastline1) || "coastline".equals(coastline1);
    7777        String railway1 = w.get("railway");
    78         boolean isSubway1 = railway1 != null && railway1.equals("subway");
    79         boolean isBuilding = false;
    80         if(w.get("building") != null)
    81             isBuilding = true;
    82        
    83         if( w.get("highway") == null && w.get("waterway") == null && (railway1 == null || isSubway1)  && !isCoastline1 && !isBuilding)
     78        boolean isSubway1 = "subway".equals(railway1);
     79        boolean isTram1 = "tram".equals(railway1);
     80        boolean isBuilding = (w.get("building") != null);
     81
     82        if( w.get("highway") == null && w.get("waterway") == null && (railway1 == null || isSubway1 || isTram1)  && !isCoastline1 && !isBuilding)
    8483            return;
    8584
     
    109108                    if( !es1.intersects(es2) ) continue;
    110109                    if( isSubway1 && "subway".equals(railway2)) continue;
     110                    if( isTram1 && "tram".equals(railway2)) continue;
    111111
    112112                    boolean isCoastline2 = coastline2 != null && (coastline2.equals("water") || coastline2.equals("coastline"));
Note: See TracChangeset for help on using the changeset viewer.