Changeset 10981 in josm


Ignore:
Timestamp:
2016-09-09T02:13:30+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #13536 - multipolygon role verification: do not warn about incomplete relation members

File:
1 edited

Legend:

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

    r10643 r10981  
    1717import org.openstreetmap.josm.command.DeleteCommand;
    1818import org.openstreetmap.josm.data.osm.OsmPrimitive;
     19import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1920import org.openstreetmap.josm.data.osm.Relation;
    2021import org.openstreetmap.josm.data.osm.RelationMember;
     
    200201     */
    201202    private boolean checkMemberExpressionAndType(RolePreset rolePreset, RelationMember member, Relation n) {
    202         TestError possibleMatchError = null;
    203203        if (rolePreset == null || rolePreset.roles == null) {
    204204            // no restrictions on role types
    205205            return true;
    206206        }
     207        TestError possibleMatchError = null;
    207208        // iterate through all of the role definition within preset
    208209        // and look for any matching definition
     
    233234                                    tr(s, r.memberExpression, rolePreset.name), s, WRONG_TYPE,
    234235                                    member.getMember().isUsable() ? member.getMember() : n);
    235 
    236236                        }
    237237                    }
    238238                }
     239            } else if (OsmPrimitiveType.RELATION.equals(member.getType()) && !member.getMember().isUsable()
     240                    && r.types.contains(TaggingPresetType.MULTIPOLYGON)) {
     241                // if relation is incomplete we cannot verify if it's a multipolygon - so we just skip it
     242                return true;
    239243            }
    240244        }
Note: See TracChangeset for help on using the changeset viewer.