Ejemplo n.º 1
0
                void relation(const osmium::Relation& relation) {
                    if (m_write_change_ops) {
                        open_close_op_tag(relation.visible() ? (relation.version() == 1 ? operation::op_create : operation::op_modify) : operation::op_delete);
                    }

                    write_prefix();
                    m_out += "<relation";
                    write_meta(relation);

                    if (relation.tags().empty() && relation.members().empty()) {
                        m_out += "/>\n";
                        return;
                    }

                    m_out += ">\n";

                    for (const auto& member : relation.members()) {
                        write_prefix();
                        m_out += "  <member type=\"";
                        m_out += item_type_to_name(member.type());
                        oprintf(m_out, "\" ref=\"%" PRId64 "\" role=\"", member.ref());
                        xml_string(m_out, member.role());
                        m_out += "\"/>\n";
                    }

                    write_tags(relation.tags());

                    write_prefix();
                    m_out += "</relation>\n";
                }
 void relation(const osmium::Relation& rel) {
     ++rels;
     if (!matches_user_filter(rel)) return;
     ++urels;
     if (rel.visible()==false) {
         m_relfile <<
             rel.id() << "\t" <<
             rel.version() << "\t" <<
             rel.changeset() << "\t" <<
             rel.timestamp().to_iso() << "\t" <<
             rel.uid() << std::endl;
     }
 }