Changeset 5293 in josm


Ignore:
Timestamp:
Jun 21, 2012 2:21:43 AM (11 months ago)
Author:
Don-vip
Message:

fix #7758 - Do not restrict building validator tests to "building=yes", but take into account "no" and "entrance"

Location:
trunk/src/org/openstreetmap/josm/data/validation
Files:
3 edited

Legend:

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

    r5287 r5293  
    245245        } 
    246246    } 
     247 
     248    /** 
     249     * Determines if the specified primitive denotes a building. 
     250     * @param p The primitive to be tested 
     251     * @return True if building key is set and different from no,entrance 
     252     */ 
     253    protected static final boolean isBuilding(OsmPrimitive p) { 
     254        String v = p.get("building"); 
     255        return v != null && !v.equals("no") && !v.equals("entrance"); 
     256    } 
    247257} 
  • trunk/src/org/openstreetmap/josm/data/validation/tests/BuildingInBuilding.java

    r5269 r5293  
    121121        return false; 
    122122    } 
    123  
    124     private static boolean isBuilding(OsmPrimitive p) { 
    125         return "yes".equals(p.get("building")); 
    126     } 
    127123} 
  • trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java

    r4869 r5293  
    7373        boolean isSubway1 = "subway".equals(railway1); 
    7474        boolean isTram1 = "tram".equals(railway1); 
    75         boolean isBuilding = (w.get("building") != null); 
     75        boolean isBuilding = isBuilding(w); 
    7676        String waterway1 = w.get("waterway"); 
    7777 
Note: See TracChangeset for help on using the changeset viewer.