Libosmium: osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs > Class Template Reference

Libosmium Fast and flexible C++ library for working with OpenStreetMap data

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs > Class Template Reference

`#include <node_locations_for_ways.hpp>`

Inheritance diagram for osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >:
[legend]
Collaboration diagram for osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >:
[legend]

## Public Types
using | index_pos_type = TStoragePosIDs
using | index_neg_type = TStorageNegIDs

## Public Member Functions
| NodeLocationsForWays (TStoragePosIDs &storage_pos, TStorageNegIDs &storage_neg=get_dummy()) noexcept
| NodeLocationsForWays (const NodeLocationsForWays &)=delete
NodeLocationsForWays & | operator= (const NodeLocationsForWays &)=delete
| NodeLocationsForWays (NodeLocationsForWays &&) noexcept=default
NodeLocationsForWays & | operator= (NodeLocationsForWays &&) noexcept=default
| ~NodeLocationsForWays () noexcept=default
void | ignore_errors ()
TStoragePosIDs & | storage_pos () noexcept
TStorageNegIDs & | storage_neg () noexcept
void | node (const osmium::Node &node)
osmium::Location | get_node_location (const osmium::object_id_type id) const
void | way (osmium::Way &way)
void | clear ()
Public Member Functions inherited from osmium::handler::Handler
void | osm_object (const osmium::OSMObject &) const noexcept
void | node (const osmium::Node &) const noexcept
void | way (const osmium::Way &) const noexcept
void | relation (const osmium::Relation &) const noexcept
void | area (const osmium::Area &) const noexcept
void | changeset (const osmium::Changeset &) const noexcept
void | tag_list (const osmium::TagList &) const noexcept
void | way_node_list (const osmium::WayNodeList &) const noexcept
void | relation_member_list (const osmium::RelationMemberList &) const noexcept
void | outer_ring (const osmium::OuterRing &) const noexcept
void | inner_ring (const osmium::InnerRing &) const noexcept
void | changeset_discussion (const osmium::ChangesetDiscussion &) const noexcept
void | flush () const noexcept

## Private Types
template<typename T>
using | based_on_map = std::is_base_of<osmium::index::map::Map<osmium::unsigned_object_id_type, osmium::Location>, T>

## Static Private Member Functions
static dummy_type & | get_dummy ()

## Private Attributes
TStoragePosIDs & | m_storage_pos
| Object that handles the actual storage of the node locations (with positive IDs).
TStorageNegIDs & | m_storage_neg
| Object that handles the actual storage of the node locations (with negative IDs).
osmium::unsigned_object_id_type | m_last_id = 0
bool | m_ignore_errors = false
bool | m_must_sort = false

## Detailed Description

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>
class osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >

Handler to retrieve locations from nodes and add them to ways.

Template Parameters

  TStoragePosIDs | Class that handles the actual storage of the node locations (for positive IDs). It must support the set(id, value) and get(id) methods.
  TStorageNegIDs | Same but for negative IDs.

## Member Typedef Documentation

## ◆ based_on_map

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>
template<typename T>

using osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::based_on_map = std::is_base_of<osmium::index::map::Map<osmium::unsigned_object_id_type, osmium::Location>, T>
| private

## ◆ index_neg_type

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

using osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::index_neg_type = TStorageNegIDs

## ◆ index_pos_type

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

using osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::index_pos_type = TStoragePosIDs

## Constructor & Destructor Documentation

## ◆ NodeLocationsForWays() [1/3]

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::NodeLocationsForWays | ( | TStoragePosIDs & | storage_pos,
|  | TStorageNegIDs & | storage_neg = get_dummy() )
| inlineexplicitnoexcept

## ◆ NodeLocationsForWays() [2/3]

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::NodeLocationsForWays | ( | const NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs > & |  | ) |
| delete

## ◆ NodeLocationsForWays() [3/3]

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::NodeLocationsForWays | ( | NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs > && |  | ) |
| defaultnoexcept

## ◆ ~NodeLocationsForWays()

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::~NodeLocationsForWays | ( |  | ) |
| defaultnoexcept

## Member Function Documentation

## ◆ clear()

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

void osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::clear | ( |  | ) |
| inline

Call clear on the location indexes. Makes the NodeLocationsForWays handler unusable. Used to explicitly free memory if thats needed.

## ◆ get_dummy()

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

dummy_type & osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::get_dummy | ( |  | ) |
| inlinestaticprivate

## ◆ get_node_location()

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

osmium::Location osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::get_node_location | ( | const osmium::object_id_type | id | ) | const
| inline

Get location of node with given id.

## ◆ ignore_errors()

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

void osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::ignore_errors | ( |  | ) |
| inline

## ◆ node()

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

void osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::node | ( | const osmium::Node & | node | ) |
| inline

Store the location of the node in the storage.

## ◆ operator=() [1/2]

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

NodeLocationsForWays & osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::operator= | ( | const NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs > & |  | ) |
| delete

## ◆ operator=() [2/2]

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

NodeLocationsForWays & osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::operator= | ( | NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs > && |  | ) |
| defaultnoexcept

## ◆ storage_neg()

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

TStorageNegIDs & osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::storage_neg | ( |  | ) |
| inlinenoexcept

## ◆ storage_pos()

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

TStoragePosIDs & osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::storage_pos | ( |  | ) |
| inlinenoexcept

## ◆ way()

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

void osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::way | ( | osmium::Way & | way | ) |
| inline

Retrieve locations of all nodes in the way from storage and add them to the way object.

## Member Data Documentation

## ◆ m_ignore_errors

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

bool osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::m_ignore_errors = false
| private

## ◆ m_last_id

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

osmium::unsigned_object_id_type osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::m_last_id = 0
| private

## ◆ m_must_sort

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

bool osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::m_must_sort = false
| private

## ◆ m_storage_neg

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

TStorageNegIDs& osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::m_storage_neg
| private

Object that handles the actual storage of the node locations (with negative IDs).

## ◆ m_storage_pos

template<typename TStoragePosIDs, typename TStorageNegIDs = dummy_type>

TStoragePosIDs& osmium::handler::NodeLocationsForWays< TStoragePosIDs, TStorageNegIDs >::m_storage_pos
| private

Object that handles the actual storage of the node locations (with positive IDs).

The documentation for this class was generated from the following file:

- include/osmium/handler/node_locations_for_ways.hpp