// add ways of existing relation to include them in polygon analysis
Set<Way> ways = new HashSet<>(selectedWays);
ways.addAll(selectedMultipolygonRelation.getMemberPrimitives(Way.class));
final MultipolygonCreate polygon = analyzeWays(ways, true);
if (polygon == null) {
return null; //could not make multipolygon.
} else {
return Pair.create(selectedMultipolygonRelation, createRelation(polygon, new Relation(selectedMultipolygonRelation)));
}