explicit NodeRefSegment(const osmium::NodeRef& nr1, const osmium::NodeRef& nr2, const char* role, const osmium::Way* way) :
     m_first(nr1),
     m_second(nr2),
     m_role(role),
     m_way(way) {
     if (nr2.location() < nr1.location()) {
         swap_locations();
     }
 }
 void write_field_ref(const osmium::NodeRef& node_ref) {
     write_field_int('n', node_ref.ref());
     *m_out += 'x';
     if (node_ref.location()) {
         node_ref.location().as_string(std::back_inserter(*m_out), 'y');
     } else {
         *m_out += 'y';
     }
 }
 NodeRefSegment(const osmium::NodeRef& nr1, const osmium::NodeRef& nr2, role_type role, const osmium::Way* way) noexcept :
     m_first(nr1),
     m_second(nr2),
     m_way(way),
     m_role(role) {
     if (nr2.location() < nr1.location()) {
         using std::swap;
         swap(m_first, m_second);
     }
 }
Exemple #4
0
 point_type create_point(const osmium::NodeRef& node_ref) {
     try {
         return create_point(node_ref.location());
     } catch (osmium::geometry_error& e) {
         e.set_id("node", node_ref.ref());
         throw;
     }
 }
 void report_ring_not_closed(const osmium::NodeRef& nr, const osmium::Way* way = nullptr) override {
     header("ring not closed");
     *m_out << "node_id=" << nr.ref() << " location=" << nr.location();
     if (way) {
         *m_out << " on way " << way->id();
     }
     *m_out << "\n";
 }
Exemple #6
0
 point_type create_point(const osmium::NodeRef& node_ref) {
     return create_point(node_ref.location());
 }
 void report_duplicate_segment(const osmium::NodeRef& nr1, const osmium::NodeRef& nr2) override {
     header("duplicate segment");
     *m_out << "node_id1=" << nr1.ref() << " location1=" << nr1.location()
            << " node_id2=" << nr2.ref() << " location2=" << nr2.location() << "\n";
 }