Changeset 5655 in josm for trunk/src/org


Ignore:
Timestamp:
2013-01-01T19:50:14+01:00 (12 years ago)
Author:
Don-vip
Message:

fix #8314 - Validator: handle of incomplete relation members in recent changes (relation checker and addresses)

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

Legend:

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

    r5647 r5655  
    176176        if (centroid == null) return; // fix #8305
    177177        double maxDistance = Main.pref.getDouble("validator.addresses.max_street_distance", 200.0);
     178        boolean hasIncompleteWays = false;
    178179        for (Way streetPart : street) {
    179180            for (Pair<Node, Node> chunk : streetPart.getNodePairs(false)) {
     
    184185                }
    185186            }
     187            if (!hasIncompleteWays && streetPart.isIncomplete()) {
     188                hasIncompleteWays = true;
     189            }
    186190        }
    187         // No street segment found near this house, report error
     191        // No street segment found near this house, report error on if the relation does not contain incomplete street ways (fix #8314)
     192        if (hasIncompleteWays) return;
    188193        List<OsmPrimitive> errorList = new ArrayList<OsmPrimitive>(street);
    189194        errorList.add(0, house);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java

    r5641 r5655  
    179179                            for (Collection<OsmPrimitive> c : Arrays.asList(new Collection[]{ri.nodes, ri.ways, ri.relations})) {
    180180                                for (OsmPrimitive p : c) {
    181                                     if (!r.memberExpression.match(p)) {
     181                                    if (p.isUsable() && !r.memberExpression.match(p)) {
    182182                                        wrongTypes.add(p);
    183183                                    }
Note: See TracChangeset for help on using the changeset viewer.