Changeset 11149 in josm for trunk/src


Ignore:
Timestamp:
2016-10-20T11:14:10+02:00 (3 years ago)
Author:
bastiK
Message:

applied #13086 - changed self-intersecting ways detection (patch by Gerd Petermann, minor javadoc changes)

File:
1 edited

Legend:

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

    r11136 r11149  
    3232    public void visit(Way w) {
    3333        Set<Node> nodes = new HashSet<>();
    34         int last = w.getNodesCount();
    35         if (last < 2)
    36             return;
    37         if (w.firstNode() == w.lastNode())
    38             last--; // closed way, ignore last node
    39         nodes.add(w.firstNode());
    40         for (int i = 1; i < last; i++) {
     34        for (int i = 1; i < w.getNodesCount() - 1; i++) {
    4135            Node n = w.getNode(i);
    4236            if (nodes.contains(n)) {
Note: See TracChangeset for help on using the changeset viewer.