Esempio n. 1
0
    // - walk over all node-versions
    //   - walk over all bboxes
    //     - if the node-id is recorded in the bboxes node-tracker or in the extra-node-tracker
    //       - send the node to the bboxes writer
    void node(const osmium::Node& node) {
        if (debug) {
            std::cerr << "softcut node " << node.positive_id() << " v" << node.version() << "\n";
        }

        for (const auto& extract : info->extracts) {
            if (extract->node_tracker.get(node.positive_id()) ||
                extract->extra_node_tracker.get(node.positive_id())) {
                extract->write(node);
            }
        }
    }
Esempio n. 2
0
    // - walk over all node-versions
    //   - walk over all bboxes
    //     - if the current node-version is inside the bbox
    //       - record its id in the bboxes node-tracker
    void node(const osmium::Node& node) {
        if (debug) {
            std::cerr << "softcut node " << node.positive_id() << " v" << node.version() << "\n";
        }

        for (const auto& extract : info->extracts) {
            if (extract->contains(node)) {
                if (debug) std::cerr << "node is in extract, recording in node_tracker\n";

                extract->node_tracker.set(node.positive_id());
            }
        }
    }
            /**
             * Store the location of the node in the storage.
             */
            void node(const osmium::Node& node) {
                if (node.positive_id() < m_last_id) {
                    m_must_sort = true;
                }
                m_last_id = node.positive_id();

                const auto id = node.id();
                if (id >= 0) {
                    m_storage_pos.set(static_cast<osmium::unsigned_object_id_type>( id), node.location());
                } else {
                    m_storage_neg.set(static_cast<osmium::unsigned_object_id_type>(-id), node.location());
                }
            }
Esempio n. 4
0
	void node( osmium::Node& node ) {
		const char* value= node.tags().get_value_by_key("highway");
		const char* name = node.tags().get_value_by_key("name");
		if(name && value && !strcmp(value, "bus_stop")){
			map[node.positive_id()] = name;
		}
		
	}
Esempio n. 5
0
 void node(const osmium::Node& node) {
     m_node_index.set(node.positive_id(), m_offset);
     m_offset += node.byte_size();
 }
 void enode(extract_data& e, const osmium::Node& node) {
     if (e.contains(node.location())) {
         e.node_ids.set(node.positive_id());
     }
 }
 void enode(extract_data& e, const osmium::Node& node) {
     if (e.node_ids.get(node.positive_id()) ||
         e.extra_node_ids.get(node.positive_id())) {
         e.write(node);
     }
 }