Changeset 6937 in josm for trunk/src


Ignore:
Timestamp:
2014-03-28T20:03:34+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #9866 - validator - wrong roundabout test for highway *_links

File:
1 edited

Legend:

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

    r6573 r6937  
    112112    private void testWrongRoundabout(Way w) {
    113113        Map<String, List<Way>> map = new HashMap<String, List<Way>>();
    114         // Count all highways (per type) connected to this roundabout
     114        // Count all highways (per type) connected to this roundabout, except links
    115115        // As roundabouts are closed ways, take care of not processing the first/last node twice
    116116        for (Node n : new HashSet<Node>(w.getNodes())) {
    117117            for (Way h : Utils.filteredCollection(n.getReferrers(), Way.class)) {
    118                 if (h != w && h.hasKey("highway")) {
    119                     List<Way> list = map.get(h.get("highway"));
     118                String value = h.get("highway");
     119                if (h != w && value != null && !value.endsWith("_link")) {
     120                    List<Way> list = map.get(value);
    120121                    if (list == null) {
    121                         map.put(h.get("highway"), list = new ArrayList<Way>());
     122                        map.put(value, list = new ArrayList<Way>());
    122123                    }
    123124                    list.add(h);
Note: See TracChangeset for help on using the changeset viewer.