Libosmium  2.7.1
Fast and flexible C++ library for working with OpenStreetMap data
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
osmium::handler::CheckOrder Class Reference

#include <check_order.hpp>

Inheritance diagram for osmium::handler::CheckOrder:
Inheritance graph
[legend]
Collaboration diagram for osmium::handler::CheckOrder:
Collaboration graph
[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
 
void node (const osmium::Node &) const
 
void way (const osmium::Way &) const
 
void relation (const osmium::Relation &) const
 
void area (const osmium::Area &) const
 
void changeset (const osmium::Changeset &) const
 
void tag_list (const osmium::TagList &) const
 
void way_node_list (const osmium::WayNodeList &) const
 
void relation_member_list (const osmium::RelationMemberList &) const
 
void outer_ring (const osmium::OuterRing &) const
 
void inner_ring (const osmium::InnerRing &) const
 
void changeset_discussion (const osmium::ChangesetDiscussion &) const
 
void flush () const
 

Private Attributes

osmium::object_id_type m_max_node_id = std::numeric_limits<osmium::object_id_type>::min()
 
osmium::object_id_type m_max_way_id = std::numeric_limits<osmium::object_id_type>::min()
 
osmium::object_id_type m_max_relation_id = std::numeric_limits<osmium::object_id_type>::min()
 

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. IDs have to be unique for each type.

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

osmium::object_id_type osmium::handler::CheckOrder::max_node_id ( ) const
inlinenoexcept
osmium::object_id_type osmium::handler::CheckOrder::max_relation_id ( ) const
inlinenoexcept
osmium::object_id_type osmium::handler::CheckOrder::max_way_id ( ) const
inlinenoexcept
void osmium::handler::CheckOrder::node ( const osmium::Node node)
inline
void osmium::handler::CheckOrder::relation ( const osmium::Relation relation)
inline
void osmium::handler::CheckOrder::way ( const osmium::Way way)
inline

Member Data Documentation

osmium::object_id_type osmium::handler::CheckOrder::m_max_node_id = std::numeric_limits<osmium::object_id_type>::min()
private
osmium::object_id_type osmium::handler::CheckOrder::m_max_relation_id = std::numeric_limits<osmium::object_id_type>::min()
private
osmium::object_id_type osmium::handler::CheckOrder::m_max_way_id = std::numeric_limits<osmium::object_id_type>::min()
private

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