|
Libosmium
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <check_order.hpp>


Public Member Functions | |
| CheckOrder (bool with_history=false) | |
| 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 |
| osmium::object_version_type | m_last_version = 0 |
| bool | m_has_node = false |
| bool | m_has_way = false |
| bool | m_has_relation = false |
| bool | m_with_history |
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.
Constructor has a single bool parameter. If this is false (default) the check is done for normal OSM data files, i.e. IDs have to be unique for each type. If this is true, the check is done for OSM history files, the combination ID/version has to be unique and the versions need to be in order.
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.
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |