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

Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
osmium::handler::CheckOrder Class Reference

`#include <check_order.hpp>`

Inheritance diagram for osmium::handler::CheckOrder:
[legend]
Collaboration diagram for osmium::handler::CheckOrder:
[legend]

## Public Member Functions
void | node (const osmium::Node &node)
void | way (const osmium::Way &way)
void | relation (const osmium::Relation &relation)
osmium::object_id_type | max_node_id () const noexcept
osmium::object_id_type | max_way_id () const noexcept
osmium::object_id_type | max_relation_id () const noexcept
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 Attributes
osmium::object_id_type | m_max_node_id = 0
osmium::object_id_type | m_max_way_id = 0
osmium::object_id_type | m_max_relation_id = 0
bool | m_has_node = false
bool | m_has_way = false
bool | m_has_relation = false

## Detailed Description

Handler that can be used to check that an OSM file is ordered correctly. Ordered in this case refers to the usual order in OSM files: First nodes in the order of their IDs, then ways in the order of their IDs, then relations in the order or their IDs. Negative IDs are ordered first then positive IDs, both ordered by absolute value.

IDs have to be unique for each type. This check will fail for history files.

To use this, add a CheckOrder member variable to your handler and call the node(), way(), and relation() methods from your node(), way(), and relations() handlers, respectively. An out_of_order_error exception will be thrown when the input is not in order.

## Member Function Documentation

## ◆ max_node_id()

osmium::object_id_type osmium::handler::CheckOrder::max_node_id | ( |  | ) | const
| inline noexcept

## ◆ max_relation_id()

osmium::object_id_type osmium::handler::CheckOrder::max_relation_id | ( |  | ) | const
| inline noexcept

## ◆ max_way_id()

osmium::object_id_type osmium::handler::CheckOrder::max_way_id | ( |  | ) | const
| inline noexcept

## ◆ node()

void osmium::handler::CheckOrder::node | ( | const osmium::Node & | node | ) |
| inline

## ◆ relation()

void osmium::handler::CheckOrder::relation | ( | const osmium::Relation & | relation | ) |
| inline

## ◆ way()

void osmium::handler::CheckOrder::way | ( | const osmium::Way & | way | ) |
| inline

## Member Data Documentation

## ◆ m_has_node

bool osmium::handler::CheckOrder::m_has_node = false
| private

## ◆ m_has_relation

bool osmium::handler::CheckOrder::m_has_relation = false
| private

## ◆ m_has_way

bool osmium::handler::CheckOrder::m_has_way = false
| private

## ◆ m_max_node_id

osmium::object_id_type osmium::handler::CheckOrder::m_max_node_id = 0
| private

## ◆ m_max_relation_id

osmium::object_id_type osmium::handler::CheckOrder::m_max_relation_id = 0
| private

## ◆ m_max_way_id

osmium::object_id_type osmium::handler::CheckOrder::m_max_way_id = 0
| private

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

- include/osmium/handler/check_order.hpp