Ignore:
Timestamp:
2010-10-24T01:55:47+02:00 (14 years ago)
Author:
bastik
Message:

'see JOSM # 5574 (patch by julianladisch) - do not warn for endpoint near border of amenity area'

Location:
applications/editors/josm/plugins/validator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/build.xml

    r22550 r23792  
    2626          ** update before publishing
    2727        -->
    28         <property name="commit.message" value="i18n fix" />
     28        <property name="commit.message" value="see JOSM # 5574 (patch by julianladisch) - do not warn for endpoint near border of amenity area" />
    2929        <property name="plugin.main.version" value="3408" />
    3030
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnconnectedWays.java

    r20828 r23792  
    9999                if (en == null)
    100100                    continue;
    101                 //if("turning_circle".equals(en.get("highway")) ||
    102                 //        (isexit != null && isexit) || en.get("barrier") != null)
    103                 //    c4++;
    104101                if(!s.highway)
    105102                    continue;
    106103                if (!endnodes_highway.contains(en))
    107104                    continue;
    108                 Boolean isexit = OsmUtils.getOsmBoolean(en.get("noexit"));
    109                 if("turning_circle".equals(en.get("highway")) ||
    110                    "bus_stop".equals(en.get("highway")) ||
    111                   (isexit != null && isexit) || en.get("barrier") != null)
     105                if("turning_circle".equals(en.get("highway"))
     106                    || "bus_stop".equals(en.get("highway"))
     107                    || OsmUtils.isTrue(en.get("noexit"))
     108                    || en.hasKey("barrier"))
    112109                    continue;
    113110                // There's a small false-positive here.  Imagine an intersection
     
    213210            String railway = w.get("railway");
    214211            String highway = w.get("highway");
    215             this.isAbandoned = "abandoned".equals(railway) || "yes".equals(w.get("disused"));
     212            this.isAbandoned = "abandoned".equals(railway) || OsmUtils.isTrue(w.get("disused"));
    216213            this.highway = (highway != null || railway != null) && !isAbandoned;
    217214            this.isBoundary = !this.highway && "administrative".equals(w.get("boundary"));
     
    326323
    327324        public boolean isArea() {
    328             return w.get("landuse") != null
    329                 || w.get("leisure") != null
    330                 || w.get("building") != null;
     325            return w.hasKey("landuse")
     326                || w.hasKey("leisure")
     327                || w.hasKey("amenity")
     328                || w.hasKey("building");
    331329        }
    332330    }
     
    336334        List<MyWaySegment> ret = new ArrayList<MyWaySegment>();
    337335        if (!w.isUsable()
    338             || w.get("barrier") != null
     336            || w.hasKey("barrier")
    339337            || "cliff".equals(w.get("natural")))
    340338            return ret;
     
    360358        ways.addAll(getWaySegments(w));
    361359        Set<Node> set = endnodes;
    362         if(w.get("highway") != null || w.get("railway") != null)
     360        if(w.hasKey("highway") || w.hasKey("railway"))
    363361            set = endnodes_highway;
    364362        addNode(w.firstNode(), set);
Note: See TracChangeset for help on using the changeset viewer.