node2 = node2.getNextSibling();
}
map.addWay(osmWay);
} else if (phase == 1 && element.getTagName().equals("relation")) {
OSMRelation osmRelation = new OSMRelation();
osmRelation.setId(Long.parseLong(element.getAttribute("id")));
processTags(osmRelation, element);
Node node2 = element.getFirstChild();
while (node2 != null) {
if (!(node2 instanceof Element)) {
node2 = node2.getNextSibling();
continue;
}
Element element2 = (Element) node2;
if (element2.getNodeName().equals("member")) {
OSMRelationMember member = new OSMRelationMember();
member.setRole(element2.getAttribute("role"));
member.setType(element2.getAttribute("type"));
member.setRef(Long.parseLong(element2.getAttribute("ref")));
osmRelation.addMember(member);
}
node2 = node2.getNextSibling();
}
map.addRelation(osmRelation);
}