Ignore:
Timestamp:
2017-04-30T22:45:11+02:00 (3 years ago)
Author:
Don-vip
Message:

add Node.getParentWays()

Location:
trunk/src/org/openstreetmap/josm/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r11796 r12031  
    44import java.awt.geom.Area;
    55import java.util.Collection;
     6import java.util.List;
    67import java.util.Objects;
    78import java.util.Set;
     
    429430        return coor != null && !coor.isIn(area);
    430431    }
     432
     433    /**
     434     * Replies the set of referring ways.
     435     * @return the set of referring ways
     436     * @since 12031
     437     */
     438    public List<Way> getParentWays() {
     439        return getFilteredList(getReferrers(), Way.class);
     440    }
    431441}
  • trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java

    r11913 r12031  
    186186        carsWays = 0;
    187187
    188         for (Way w : OsmPrimitive.getFilteredList(n.getReferrers(), Way.class)) {
     188        for (Way w : n.getParentWays()) {
    189189            String highway = w.get(HIGHWAY);
    190190            if (highway != null) {
Note: See TracChangeset for help on using the changeset viewer.