void relation(const osmium::Relation& relation) { *m_out += 'r'; write_meta(relation); *m_out += " M"; bool first = true; for (const auto& member : relation.members()) { if (first) { first = false; } else { *m_out += ','; } *m_out += item_type_to_char(member.type()); output_formatted("%" PRId64 "@", member.ref()); *m_out += member.role(); } *m_out += '\n'; }
void relation(const osmium::Relation& relation) { m_out << "r"; write_meta(relation); m_out << " M"; int n=0; for (const auto& member : relation.members()) { if (n++ != 0) { m_out << ","; } m_out << item_type_to_char(member.type()) << member.ref() << "!" << member.role(); } write_tags(relation.tags()); m_out << "\n"; ::write(this->fd(), m_out.str().c_str(), m_out.str().size()); m_out.str(""); }
void header(const char* msg) { *m_out << "DATA PROBLEM: " << msg << " on " << item_type_to_char(m_object_type) << m_object_id << ": "; }
inline std::basic_ostream<TChar, TTraits>& operator<<(std::basic_ostream<TChar, TTraits>& out, const item_type item_type) { return out << item_type_to_char(item_type); }