Changeset 30988 in osm for applications/editors/josm/plugins/merge-overlap
- Timestamp:
- 2015-02-15T19:12:55+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/merge-overlap/src/mergeoverlap/hack/MyRelationMemberConflictResolverModel.java
r30782 r30988 30 30 return NUM_CONFLICTS_PROP; 31 31 } 32 32 33 33 @Override 34 34 protected void populate(Relation relation, OsmPrimitive primitive) { … … 38 38 /** 39 39 * Populates the model with the members of the relation <code>relation</code> 40 * referring to <code> primitive</code>.40 * referring to <code>way</code>. 41 41 * 42 42 * @param relation the parent relation 43 * @param primitive the child primitive43 * @param way the child way 44 44 */ 45 protected void populate(Relation relation, OsmPrimitive primitive, Map<Way, Way> oldWays) {45 protected void populate(Relation relation, Way way, Map<Way, Way> oldWays) { 46 46 for (int i =0; i<relation.getMembersCount();i++) { 47 if (MergeOverlapAction.getOld(relation.getMember(i).getWay(), oldWays) == MergeOverlapAction.getOld((Way)primitive, oldWays)) { 47 RelationMember mb = relation.getMember(i); 48 if (mb.isWay() && MergeOverlapAction.getOld(mb.getWay(), oldWays) == MergeOverlapAction.getOld(way, oldWays)) { 48 49 decisions.add(new RelationMemberConflictDecision(relation, i)); 49 50 } … … 62 63 * 63 64 * @param relations the parent relations. Empty list assumed if null. 64 * @param member Primitives the child primitives. Empty list assumed if null.65 * @param memberWays the child ways. Empty list assumed if null. 65 66 */ 66 public void populate(Collection<Relation> relations, Collection< ? extends OsmPrimitive> memberPrimitives, Map<Way, Way> oldWays) {67 public void populate(Collection<Relation> relations, Collection<Way> memberWays, Map<Way, Way> oldWays) { 67 68 decisions.clear(); 68 69 relations = relations == null ? new LinkedList<Relation>() : relations; 69 member Primitives = memberPrimitives == null ? new LinkedList<OsmPrimitive>() : memberPrimitives;70 memberWays = memberWays == null ? new LinkedList<Way>() : memberWays; 70 71 for (Relation r : relations) { 71 for ( OsmPrimitive p: memberPrimitives) {72 populate(r, p, oldWays);72 for (Way w : memberWays) { 73 populate(r, w, oldWays); 73 74 } 74 75 } … … 98 99 case KEEP: 99 100 if (newPrimitive instanceof Way) { 100 modifiedRelation.addMember(new RelationMember(decision.getRole(), 101 modifiedRelation.addMember(new RelationMember(decision.getRole(), 101 102 MergeOverlapAction.getOld((Way)newPrimitive, oldWays))); 102 103 } else {
Note:
See TracChangeset
for help on using the changeset viewer.