Changeset 14914 in josm for trunk/src


Ignore:
Timestamp:
2019-03-21T20:50:24+01:00 (6 years ago)
Author:
GerdP
Message:

see #17475: Improve test for obsolete associatedStreet relations

  • if member is a multipolygon relation try to find location, for other relation types location is not computed
  • if location of any member is not computed the relation is not marked obsolete
File:
1 edited

Legend:

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

    r14906 r14914  
    430430
    431431        for (RelationMember m : r.getMembers()) {
    432             if (m.getMember().isIncomplete() || m.isRelation() || !isInWarnCountry(m, countryCodes))
     432            if (m.getMember().isIncomplete() || !isInWarnCountry(m, countryCodes))
    433433                return;
    434434
     
    475475        } else if (m.isWay()) {
    476476            center = m.getWay().getBBox().getCenter();
     477        } else if (m.isRelation() && m.getRelation().isMultipolygon()) {
     478            center = m.getRelation().getBBox().getCenter();
    477479        }
    478480        if (center == null)
    479             return true;
     481            return false;
    480482        for (String country : countryCodes) {
    481483            if (Territories.isIso3166Code(country, center))
Note: See TracChangeset for help on using the changeset viewer.