1#ifndef OSMIUM_HANDLER_NODE_LOCATIONS_FOR_WAYS_HPP
2#define OSMIUM_HANDLER_NODE_LOCATIONS_FOR_WAYS_HPP
63 template <
typename TStoragePosIDs,
typename TStorageNegIDs = dummy_type>
67 using based_on_map = std::is_base_of<osmium::index::map::Map<osmium::unsigned_object_id_type, osmium::Location>, T>;
133 const auto id =
node.id();
160 m_last_id = std::numeric_limits<osmium::unsigned_object_id_type>::max();
163 for (
auto& node_ref :
way.nodes()) {
165 if (!node_ref.location()) {
170 throw osmium::not_found{
"location for one or more nodes not found in node location index"};
Definition: location.hpp:271
Definition: handler.hpp:71
Definition: node_locations_for_ways.hpp:64
TStoragePosIDs & storage_pos() noexcept
Definition: node_locations_for_ways.hpp:116
std::is_base_of< osmium::index::map::Map< osmium::unsigned_object_id_type, osmium::Location >, T > based_on_map
Definition: node_locations_for_ways.hpp:67
void way(osmium::Way &way)
Definition: node_locations_for_ways.hpp:155
osmium::unsigned_object_id_type m_last_id
Definition: node_locations_for_ways.hpp:83
NodeLocationsForWays(TStoragePosIDs &storage_pos, TStorageNegIDs &storage_neg=get_dummy()) noexcept
Definition: node_locations_for_ways.hpp:98
osmium::Location get_node_location(const osmium::object_id_type id) const
Definition: node_locations_for_ways.hpp:144
TStoragePosIDs & m_storage_pos
Object that handles the actual storage of the node locations (with positive IDs).
Definition: node_locations_for_ways.hpp:78
bool m_ignore_errors
Definition: node_locations_for_ways.hpp:85
TStorageNegIDs & storage_neg() noexcept
Definition: node_locations_for_ways.hpp:120
TStorageNegIDs index_neg_type
Definition: node_locations_for_ways.hpp:73
void node(const osmium::Node &node)
Definition: node_locations_for_ways.hpp:127
static dummy_type & get_dummy()
Definition: node_locations_for_ways.hpp:91
NodeLocationsForWays(const NodeLocationsForWays &)=delete
NodeLocationsForWays & operator=(const NodeLocationsForWays &)=delete
void ignore_errors()
Definition: node_locations_for_ways.hpp:112
TStorageNegIDs & m_storage_neg
Object that handles the actual storage of the node locations (with negative IDs).
Definition: node_locations_for_ways.hpp:81
void clear()
Definition: node_locations_for_ways.hpp:179
TStoragePosIDs index_pos_type
Definition: node_locations_for_ways.hpp:72
bool m_must_sort
Definition: node_locations_for_ways.hpp:87
NodeLocationsForWays(NodeLocationsForWays &&) noexcept=default
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53
int64_t object_id_type
Type for OSM object (node, way, or relation) IDs.
Definition: types.hpp:45
uint64_t unsigned_object_id_type
Type for OSM object (node, way, or relation) IDs where we only allow positive IDs.
Definition: types.hpp:46