Example #1
0
    void way(const osmium::Way& way) {
        // detect a new way
        if (current_way_id != 0 && current_way_id != way.positive_id()) {
            write_way_extra_nodes();
            current_way_nodes.clear();
        }
        current_way_id = way.positive_id();

        if (debug) {
            std::cerr << "softcut way " << way.positive_id() << " v" << way.version() << "\n";
        }

        for (const auto& node_ref : way.nodes()) {
            current_way_nodes.insert(node_ref.positive_ref());
        }

        for (const auto& extract : info->extracts) {
            for (const auto& node_ref : way.nodes()) {
                if (extract->node_tracker.get(node_ref.positive_ref())) {
                    if (debug) {
                        std::cerr << "way has a node (" << node_ref.positive_ref() << ") inside extract, recording in way_tracker\n";
                    }
                    extract->way_tracker.set(way.positive_id());
                    break;
                }
            }
        }
    }
Example #2
0
    // - walk over all way-versions
    //   - walk over all bboxes
    //     - if the way-id is recorded in the bboxes way-tracker
    //       - send the way to the bboxes writer
    void way(const osmium::Way& way) {
        if (debug) {
            std::cerr << "softcut way " << way.positive_id() << " v" << way.version() << "\n";
        }

        for (const auto& extract : info->extracts) {
            if (extract->way_tracker.get(way.positive_id())) {
                extract->write(way);
            }
        }
    }
 void eway(extract_data& e, const osmium::Way& way) {
     for (const auto& nr : way.nodes()) {
         if (e.node_ids.get(nr.positive_ref())) {
             e.way_ids.set(way.positive_id());
             for (const auto& nr : way.nodes()) {
                 e.extra_node_ids.set(nr.ref());
             }
             return;
         }
     }
 }
 void way(const osmium::Way& way) {
     for (const auto& node_ref : way.nodes()) {
         m_index_n2w.set(node_ref.positive_ref(), way.positive_id());
     }
 }
Example #5
0
 void way(const osmium::Way& way) {
     for (auto& wn : way.nodes()) {
         m_index_n2w.set(wn.positive_ref(), way.positive_id());
     }
 }
Example #6
0
 void way(const osmium::Way& way) {
     m_way_index.set(way.positive_id(), m_offset);
     m_offset += way.byte_size();
 }
 void eway(extract_data& e, const osmium::Way& way) {
     if (e.way_ids.get(way.positive_id())) {
         e.write(way);
     }
 }