Loading...
Searching...
No Matches
osmium Namespace Reference

Namespace for everything in the Osmium library. More...

## Namespaces

namespace | area
| Code related to the building of areas (multipolygons) from relations.
namespace | builder
| Classes for building OSM objects and other items in buffers.
namespace | config
namespace | diff_handler
| Osmium diff handlers provide access to differences between OSM object versions.
namespace | experimental
| Experimental code that is not "officially" supported.
namespace | geom
| Everything related to geometry handling.
namespace | handler
| Osmium handlers provide callbacks for OSM objects.
namespace | index
| Indexing of OSM data, Locations, etc.
namespace | io
| Everything related to input and output of OSM data.
namespace | memory
namespace | osm_entity_bits
| Bit field for OSM entity types.
namespace | relations
| Code related to the assembly of OSM relations.
namespace | tags
| Code related to working with OSM tags.
namespace | thread
| Threading-related low-level code.
namespace | util
| Helpful utility classes and functions not strictly OSM related.

## Classes

class | AnonymousMemoryMapping
class | AnonymousTypedMemoryMapping
class | Area
struct | bzip2_error
class | Changeset
| An OSM Changeset, a group of changes made by a single user over a short period of time. More...
class | ChangesetComment
class | ChangesetDiscussion
class | CRC
class | CRC_zlib
class | DeltaDecode
class | DeltaEncode
class | DiffIterator
class | DiffObject
class | DiffObjectDerived
class | geometry_error
struct | gzip_error
struct | id_order
class | indirect_iterator
class | InnerRing
struct | invalid_location
struct | io_error
class | ItemStash
struct | iterator_range
class | Location
struct | location_equal
struct | location_less
struct | map_factory_error
class | max_op
class | MemoryMapping
class | MemoryUsage
class | metadata_options
class | min_op
class | Node
class | NodeRef
class | NodeRefList
struct | not_found
class | nwr_array
struct | object_equal_type_id
struct | object_equal_type_id_version
struct | object_order_type_id_reverse_version
struct | object_order_type_id_version
struct | object_order_type_id_version_without_timestamp
class | ObjectPointerCollection
class | Options
class | OSMEntity
| OSMEntity is the abstract base class for the OSMObject and Changeset classes. More...
class | OSMObject
struct | out_of_order_error
class | OuterRing
class | ProgressBar
struct | projection_error
class | Relation
class | RelationMember
class | RelationMemberList
class | Segment
class | StringMatcher
class | Tag
class | TagList
class | TagMatcher
class | TagsFilterBase
class | Timer
class | Timestamp
class | TypedMemoryMapping
class | UndirectedSegment
struct | unknown_type
struct | unsupported_file_format_error
class | VerboseOutput
class | Way
class | WayNodeList

## Typedefs

using | DiffNode = DiffObjectDerived<osmium::Node>
using | DiffWay = DiffObjectDerived<osmium::Way>
using | DiffRelation = DiffObjectDerived<osmium::Relation>
using | object_id_type = int64_t
| Type for OSM object (node, way, or relation) IDs.
using | unsigned_object_id_type = uint64_t
| Type for OSM object (node, way, or relation) IDs where we only allow positive IDs.
using | object_version_type = uint32_t
| Type for OSM object version number.
using | changeset_id_type = uint32_t
| Type for OSM changeset IDs.
using | user_id_type = uint32_t
| Type for OSM user IDs.
using | signed_user_id_type = int32_t
| Type for signed OSM user IDs.
using | num_changes_type = uint32_t
| Type for changeset num_changes.
using | num_comments_type = uint32_t
| Type for changeset num_comments.
using | string_size_type = uint16_t
using | changeset_comment_size_type = uint32_t
using | TagsFilter = TagsFilterBase<bool>

## Enumerations

enum class | diff_indicator_type { none = 0 , left = 1 , right = 2 , both = 3 }
enum class | item_type : uint16_t { undefined = 0x00 , node = 0x01 , way = 0x02 , relation = 0x03 , area = 0x04 , changeset = 0x05 , tag_list = 0x11 , way_node_list = 0x12 , relation_member_list = 0x13 , relation_member_list_with_full_members = 0x23 , outer_ring = 0x40 , inner_ring = 0x41 , changeset_discussion = 0x80 }
enum | { max_osm_string_length = 256 * 4 }
| Maximum of 256 characters of max 4 bytes each (in UTF-8 encoding) More...

## Functions

constexpr | _timestamp (const osmium::Timestamp &value) noexcept
constexpr | _timestamp (time_t value) noexcept
constexpr | _timestamp (uint32_t value) noexcept
| _timestamp (const char *value)
| _timestamp (const std::string &value)
template<typename TBasicIterator>
DiffIterator< TBasicIterator > | make_diff_iterator (TBasicIterator begin, TBasicIterator end)
template<typename TIterator, typename... THandlers>
void | apply_diff (TIterator it, TIterator end, THandlers &... handlers)
template<typename TSource, typename... THandlers>
void | apply_diff (TSource &source, THandlers &... handlers)
template<typename... THandlers>
void | apply_diff (osmium::memory::Buffer &buffer, THandlers &... handlers)
template<typename... THandlers>
void | apply_diff (const osmium::memory::Buffer &buffer, THandlers &... handlers)
bool | opl_parse (const char *data, osmium::memory::Buffer &buffer)
osmium::object_id_type | object_id_to_area_id (osmium::object_id_type id, osmium::item_type type) noexcept
osmium::object_id_type | area_id_to_object_id (osmium::object_id_type id) noexcept
bool | operator== (const Changeset &lhs, const Changeset &rhs)
bool | operator!= (const Changeset &lhs, const Changeset &rhs)
bool | operator< (const Changeset &lhs, const Changeset &rhs)
bool | operator> (const Changeset &lhs, const Changeset &rhs)
bool | operator<= (const Changeset &lhs, const Changeset &rhs)
bool | operator>= (const Changeset &lhs, const Changeset &rhs)
uint16_t | byte_swap_16 (uint16_t value) noexcept
uint32_t | byte_swap_32 (uint32_t value) noexcept
uint64_t | byte_swap_64 (uint64_t value) noexcept
item_type | nwr_index_to_item_type (unsigned int i) noexcept
unsigned int | item_type_to_nwr_index (item_type type) noexcept
item_type | char_to_item_type (const char c) noexcept
char | item_type_to_char (const item_type type) noexcept
const char * | item_type_to_name (const item_type type) noexcept
template<typename TChar, typename TTraits>
std::basic_ostream< TChar, TTraits > & | operator<< (std::basic_ostream< TChar, TTraits > &out, const item_type item_type)
constexpr bool | operator== (const Location &lhs, const Location &rhs) noexcept
constexpr bool | operator!= (const Location &lhs, const Location &rhs) noexcept
constexpr bool | operator< (const Location &lhs, const Location &rhs) noexcept
constexpr bool | operator> (const Location &lhs, const Location &rhs) noexcept
constexpr bool | operator<= (const Location &lhs, const Location &rhs) noexcept
constexpr bool | operator>= (const Location &lhs, const Location &rhs) noexcept
template<typename TChar, typename TTraits>
std::basic_ostream< TChar, TTraits > & | operator<< (std::basic_ostream< TChar, TTraits > &out, const osmium::Location &location)
template<typename TChar, typename TTraits>
std::basic_ostream< TChar, TTraits > & | operator<< (std::basic_ostream< TChar, TTraits > &out, const metadata_options &options)
osmium::metadata_options | detect_available_metadata (const osmium::OSMObject &object)
constexpr bool | operator== (const NodeRef &lhs, const NodeRef &rhs) noexcept
constexpr bool | operator!= (const NodeRef &lhs, const NodeRef &rhs) noexcept
constexpr bool | operator< (const NodeRef &lhs, const NodeRef &rhs) noexcept
constexpr bool | operator> (const NodeRef &lhs, const NodeRef &rhs) noexcept
constexpr bool | operator<= (const NodeRef &lhs, const NodeRef &rhs) noexcept
constexpr bool | operator>= (const NodeRef &lhs, const NodeRef &rhs) noexcept
template<typename TChar, typename TTraits>
std::basic_ostream< TChar, TTraits > & | operator<< (std::basic_ostream< TChar, TTraits > &out, const osmium::NodeRef &nr)
bool | operator== (const OSMObject &lhs, const OSMObject &rhs) noexcept
bool | operator!= (const OSMObject &lhs, const OSMObject &rhs) noexcept
bool | operator< (const OSMObject &lhs, const OSMObject &rhs) noexcept
bool | operator> (const OSMObject &lhs, const OSMObject &rhs) noexcept
bool | operator<= (const OSMObject &lhs, const OSMObject &rhs) noexcept
bool | operator>= (const OSMObject &lhs, const OSMObject &rhs) noexcept
constexpr bool | operator== (const Segment &lhs, const Segment &rhs) noexcept
| Segments are equal if both their locations are equal.
constexpr bool | operator!= (const Segment &lhs, const Segment &rhs) noexcept
template<typename TChar, typename TTraits>
std::basic_ostream< TChar, TTraits > & | operator<< (std::basic_ostream< TChar, TTraits > &out, const osmium::Segment &segment)
bool | operator== (const Tag &lhs, const Tag &rhs) noexcept
bool | operator< (const Tag &lhs, const Tag &rhs) noexcept
template<typename TChar, typename TTraits>
std::basic_ostream< TChar, TTraits > & | operator<< (std::basic_ostream< TChar, TTraits > &out, const Tag &tag)
constexpr Timestamp | start_of_time () noexcept
constexpr Timestamp | end_of_time () noexcept
template<typename TChar, typename TTraits>
std::basic_ostream< TChar, TTraits > & | operator<< (std::basic_ostream< TChar, TTraits > &out, Timestamp timestamp)
bool | operator== (const Timestamp &lhs, const Timestamp &rhs) noexcept
bool | operator!= (const Timestamp &lhs, const Timestamp &rhs) noexcept
bool | operator< (const Timestamp &lhs, const Timestamp &rhs) noexcept
bool | operator> (const Timestamp &lhs, const Timestamp &rhs) noexcept
bool | operator<= (const Timestamp &lhs, const Timestamp &rhs) noexcept
bool | operator>= (const Timestamp &lhs, const Timestamp &rhs) noexcept
template<>
osmium::Timestamp | min_op_start_value< osmium::Timestamp > ()
template<>
osmium::Timestamp | max_op_start_value< osmium::Timestamp > ()
object_id_type | string_to_object_id (const char *input)
std::pair< osmium::item_type, osmium::object_id_type > | string_to_object_id (const char *input, osmium::osm_entity_bits::type types, osmium::item_type default_type=osmium::item_type::undefined)
object_version_type | string_to_object_version (const char *input)
changeset_id_type | string_to_changeset_id (const char *input)
user_id_type | string_to_uid (const char *input)
num_changes_type | string_to_num_changes (const char *input)
num_comments_type | string_to_num_comments (const char *input)
bool | operator< (const UndirectedSegment &lhs, const UndirectedSegment &rhs) noexcept
bool | operator> (const UndirectedSegment &lhs, const UndirectedSegment &rhs) noexcept
bool | operator<= (const UndirectedSegment &lhs, const UndirectedSegment &rhs) noexcept
bool | operator>= (const UndirectedSegment &lhs, const UndirectedSegment &rhs) noexcept
template<typename TChar, typename TTraits>
std::basic_ostream< TChar, TTraits > & | operator<< (std::basic_ostream< TChar, TTraits > &out, const osmium::UndirectedSegment &segment)
template<typename T>
T | double2string (T iterator, double value, int precision)
void | double2string (std::string &out, double value, int precision)
std::size_t | file_size (int fd)
std::size_t | file_size (const char *name)
std::size_t | file_size (const std::string &name)
void | resize_file (int fd, std::size_t new_size)
std::size_t | get_pagesize () noexcept
std::size_t | file_offset (int fd) noexcept
void | file_seek (int fd, std::size_t offset) noexcept
bool | isatty (int fd) noexcept
template<typename P, typename It = typename P::first_type>
iterator_range< It > | make_range (P &&p) noexcept
template<typename T>
T | min_op_start_value ()
template<typename T>
T | max_op_start_value ()
template<typename... Ts>
std::tuple< const Ts &... > | const_tie (const Ts &... args) noexcept
std::vector< std::string > | split_string (const std::string &str, const char sep, bool compact=false)
std::vector< std::string > | split_string (const std::string &str, const char *sep, bool compact=false)
template<typename TChar, typename TTraits>
std::basic_ostream< TChar, TTraits > & | operator<< (std::basic_ostream< TChar, TTraits > &out, const StringMatcher &matcher)
template<typename T>
VerboseOutput & | operator<< (VerboseOutput &verbose_output, const T &value)
template<typename TItem, typename... THandlers>
void | apply_item (TItem &item, THandlers &&... handlers)
template<typename... THandlers>
void | apply_flush (THandlers &&... handlers)
template<typename TIterator, typename... THandlers>
void | apply_impl (TIterator it, TIterator end, THandlers &&... handlers)
template<typename TIterator, typename... THandlers>
void | apply (TIterator it, TIterator end, THandlers &&... handlers)
template<typename TContainer, typename... THandlers>
void | apply (TContainer &c, THandlers &&... handlers)
template<typename... THandlers>
void | apply (const osmium::memory::Buffer &buffer, THandlers &&... handlers)

## Detailed Description

Namespace for everything in the Osmium library.

## Typedef Documentation

## changeset_comment_size_type

using osmium::changeset_comment_size_type = uint32_t

This is the size type for the text in a changeset discussion comment. There is no official limit for this. 16 bit is not enough for existing OSM changesets, hopefully 32 bit is.

## changeset_id_type

using osmium::changeset_id_type = uint32_t

Type for OSM changeset IDs.

## DiffNode

using osmium::DiffNode = DiffObjectDerived<osmium::Node>

## DiffRelation

using osmium::DiffRelation = DiffObjectDerived<osmium::Relation>

## DiffWay

using osmium::DiffWay = DiffObjectDerived<osmium::Way>

## num_changes_type

using osmium::num_changes_type = uint32_t

Type for changeset num_changes.

## num_comments_type

using osmium::num_comments_type = uint32_t

Type for changeset num_comments.

## object_id_type

using osmium::object_id_type = int64_t

Type for OSM object (node, way, or relation) IDs.

## object_version_type

using osmium::object_version_type = uint32_t

Type for OSM object version number.

## signed_user_id_type

using osmium::signed_user_id_type = int32_t

Type for signed OSM user IDs.

## string_size_type

using osmium::string_size_type = uint16_t

Size for strings in OSM data such as user names, tag keys, roles, etc. In Osmium they can be up to 2^16 bytes long, but OSM usually has lower defined limits.

## TagsFilter

using osmium::TagsFilter = TagsFilterBase<bool>

## unsigned_object_id_type

using osmium::unsigned_object_id_type = uint64_t

Type for OSM object (node, way, or relation) IDs where we only allow positive IDs.

## user_id_type

using osmium::user_id_type = uint32_t

Type for OSM user IDs.

## Enumeration Type Documentation

## anonymous enum

anonymous enum

Maximum of 256 characters of max 4 bytes each (in UTF-8 encoding)

Enumerator
max_osm_string_length |

## diff_indicator_type

enum class osmium::diff_indicator_type

strong

Enumerator
none |
left |
right |
both |

## item_type

enum class osmium::item_type : uint16_t

strong

Enumerator
undefined |
node |
way |
relation |
area |
changeset |
tag_list |
way_node_list |
relation_member_list |
relation_member_list_with_full_members |
outer_ring |
inner_ring |
changeset_discussion |

## Function Documentation

## _timestamp() [1/5]

osmium::_timestamp | ( | const char * | value | ) |

explicit

## _timestamp() [2/5]

osmium::_timestamp | ( | const osmium::Timestamp & | value | ) |

explicitconstexprnoexcept

## _timestamp() [3/5]

osmium::_timestamp | ( | const std::string & | value | ) |

explicit

## _timestamp() [4/5]

osmium::_timestamp | ( | time_t | value | ) |

explicitconstexprnoexcept

## _timestamp() [5/5]

osmium::_timestamp | ( | uint32_t | value | ) |

explicitconstexprnoexcept

## apply() [1/3]

template<typename... THandlers>

void osmium::apply | ( | const osmium::memory::Buffer & | buffer,
|  | THandlers &&... | handlers )

inline

## apply() [2/3]

template<typename TContainer, typename... THandlers>

void osmium::apply | ( | TContainer & | c,
|  | THandlers &&... | handlers )

inline

## apply() [3/3]

template<typename TIterator, typename... THandlers>

void osmium::apply | ( | TIterator | it,
|  | TIterator | end,
|  | THandlers &&... | handlers )

inline

## apply_diff() [1/4]

template<typename... THandlers>

void osmium::apply_diff | ( | const osmium::memory::Buffer & | buffer,
|  | THandlers &... | handlers )

inline

## apply_diff() [2/4]

template<typename... THandlers>

void osmium::apply_diff | ( | osmium::memory::Buffer & | buffer,
|  | THandlers &... | handlers )

inline

## apply_diff() [3/4]

template<typename TIterator, typename... THandlers>

void osmium::apply_diff | ( | TIterator | it,
|  | TIterator | end,
|  | THandlers &... | handlers )

inline

## apply_diff() [4/4]

template<typename TSource, typename... THandlers>

void osmium::apply_diff | ( | TSource & | source,
|  | THandlers &... | handlers )

inline

## apply_flush()

template<typename... THandlers>

void osmium::apply_flush | ( | THandlers &&... | handlers | ) |

inline

## apply_impl()

template<typename TIterator, typename... THandlers>

void osmium::apply_impl | ( | TIterator | it,
|  | TIterator | end,
|  | THandlers &&... | handlers )

inline

## apply_item()

template<typename TItem, typename... THandlers>

void osmium::apply_item | ( | TItem & | item,
|  | THandlers &&... | handlers )

inline

## area_id_to_object_id()

osmium::object_id_type osmium::area_id_to_object_id | ( | osmium::object_id_type | id | ) |

inlinenoexcept

Convert area id into id of the way or relation it was created from.

Parameters

  id | Area id

Returns
  Way or Relation id.

## char_to_item_type()

item_type osmium::char_to_item_type | ( | const char | c | ) |

inlinenoexcept

## const_tie()

template<typename... Ts>

std::tuple< const Ts &... > osmium::const_tie | ( | const Ts &... | args | ) |

inlinenoexcept

Like std::tie(), but takes its arguments as const references. Used as a helper function when sorting.

## detect_available_metadata()

osmium::metadata_options osmium::detect_available_metadata | ( | const osmium::OSMObject & | object | ) |

inline

Create an instance of metadata_options based on the availability of metadata of an instance of osmium::OSMObject.

## end_of_time()

Timestamp osmium::end_of_time | ( |  | ) |

constexprnoexcept

A special Timestamp guaranteed to be ordered after any other valid Timestamp.

## item_type_to_char()

char osmium::item_type_to_char | ( | const item_type | type | ) |

inlinenoexcept

## item_type_to_name()

const char * osmium::item_type_to_name | ( | const item_type | type | ) |

inlinenoexcept

## item_type_to_nwr_index()

unsigned int osmium::item_type_to_nwr_index | ( | item_type | type | ) |

inlinenoexcept

Return index for item_type: node -> 0, way -> 1, relation -> 2

Parameters

  type | Item type. Must be node, way, or relation.

Returns
  Index.

## make_diff_iterator()

template<typename TBasicIterator>

DiffIterator< TBasicIterator > osmium::make_diff_iterator | ( | TBasicIterator | begin,
|  | TBasicIterator | end )

inline

Create a DiffIterator based on the given iterators.

## make_range()

template<typename P, typename It = typename P::first_type>

iterator_range< It > osmium::make_range | ( | P && | p | ) |

inlinenoexcept

Helper function to create iterator_range from std::pair.

## max_op_start_value()

template<typename T>

T osmium::max_op_start_value | ( |  | ) |

inline

## max_op_start_value< osmium::Timestamp >()

template<>

osmium::Timestamp osmium::max_op_start_value< osmium::Timestamp > | ( |  | ) |

inline

## min_op_start_value()

template<typename T>

T osmium::min_op_start_value | ( |  | ) |

inline

## min_op_start_value< osmium::Timestamp >()

template<>

osmium::Timestamp osmium::min_op_start_value< osmium::Timestamp > | ( |  | ) |

inline

## nwr_index_to_item_type()

item_type osmium::nwr_index_to_item_type | ( | unsigned int | i | ) |

inlinenoexcept

Return item_type for index: 0 -> node, 1 -> way, 2 -> relation

Parameters

  i | Index. Must be between 0 and 2.

Returns
  Item type.

## object_id_to_area_id()

osmium::object_id_type osmium::object_id_to_area_id | ( | osmium::object_id_type | id,
|  | osmium::item_type | type )

inlinenoexcept

Convert way or (multipolygon) relation id into unique area id.

Parameters

  id | Id of a way or relation
  type | Type of object (way or relation)

Returns
  Area id

## operator!=() [1/6]

bool osmium::operator!= | ( | const Changeset & | lhs,
|  | const Changeset & | rhs )

inline

## operator!=() [2/6]

bool osmium::operator!= | ( | const Location & | lhs,
|  | const Location & | rhs )

constexprnoexcept

## operator!=() [3/6]

bool osmium::operator!= | ( | const NodeRef & | lhs,
|  | const NodeRef & | rhs )

constexprnoexcept

Compare two NodeRefs. They are not equal if they reference different Node IDs.

## operator!=() [4/6]

bool osmium::operator!= | ( | const OSMObject & | lhs,
|  | const OSMObject & | rhs )

inlinenoexcept

## operator!=() [5/6]

bool osmium::operator!= | ( | const Segment & | lhs,
|  | const Segment & | rhs )

constexprnoexcept

## operator!=() [6/6]

bool osmium::operator!= | ( | const Timestamp & | lhs,
|  | const Timestamp & | rhs )

inlinenoexcept

## operator<() [1/7]

bool osmium::operator< | ( | const Changeset & | lhs,
|  | const Changeset & | rhs )

inline

Changesets can be ordered by id.

## operator<() [2/7]

bool osmium::operator< | ( | const Location & | lhs,
|  | const Location & | rhs )

constexprnoexcept

Compare two locations by comparing first the x and then the y coordinate. If either of the locations is undefined the result is undefined.

## operator<() [3/7]

bool osmium::operator< | ( | const NodeRef & | lhs,
|  | const NodeRef & | rhs )

constexprnoexcept

Compare two NodeRefs. NodeRefs are ordered according to the Node ID they reference.

## operator<() [4/7]

bool osmium::operator< | ( | const OSMObject & | lhs,
|  | const OSMObject & | rhs )

inlinenoexcept

OSMObjects can be ordered by type, id, version, and timestamp. Usually ordering by timestamp is not necessary as there shouldn't be two objects with the same type, id, and version. But this can happen when creating diff files from extracts, so we take the timestamp into account here.

Note that we use the absolute value of the id for a better ordering of objects with negative id. All the negative IDs come first, then the positive IDs. IDs are ordered by their absolute values. (This is the same ordering JOSM uses.)

See object_order_type_id_reverse_version if you need a different ordering.

## operator<() [5/7]

bool osmium::operator< | ( | const Tag & | lhs,
|  | const Tag & | rhs )

inlinenoexcept

## operator<() [6/7]

bool osmium::operator< | ( | const Timestamp & | lhs,
|  | const Timestamp & | rhs )

inlinenoexcept

## operator<() [7/7]

bool osmium::operator< | ( | const UndirectedSegment & | lhs,
|  | const UndirectedSegment & | rhs )

inlinenoexcept

UndirectedSegments are "smaller" if they are to the left and down of another segment. The first() location is checked first() and only if they have the same first() location the second() location is taken into account.

## operator<<() [1/10]

template<typename TChar, typename TTraits>

std::basic_ostream< TChar, TTraits > & osmium::operator<< | ( | std::basic_ostream< TChar, TTraits > & | out,
|  | const item_type | item_type )

inline

## operator<<() [2/10]

template<typename TChar, typename TTraits>

std::basic_ostream< TChar, TTraits > & osmium::operator<< | ( | std::basic_ostream< TChar, TTraits > & | out,
|  | const metadata_options & | options )

inline

## operator<<() [3/10]

template<typename TChar, typename TTraits>

std::basic_ostream< TChar, TTraits > & osmium::operator<< | ( | std::basic_ostream< TChar, TTraits > & | out,
|  | const osmium::Location & | location )

inline

Output a location to a stream.

## operator<<() [4/10]

template<typename TChar, typename TTraits>

std::basic_ostream< TChar, TTraits > & osmium::operator<< | ( | std::basic_ostream< TChar, TTraits > & | out,
|  | const osmium::NodeRef & | nr )

inline

Output a NodeRef to a stream.

## operator<<() [5/10]

template<typename TChar, typename TTraits>

std::basic_ostream< TChar, TTraits > & osmium::operator<< | ( | std::basic_ostream< TChar, TTraits > & | out,
|  | const osmium::Segment & | segment )

inline

Output Segment to a stream.

## operator<<() [6/10]

template<typename TChar, typename TTraits>

std::basic_ostream< TChar, TTraits > & osmium::operator<< | ( | std::basic_ostream< TChar, TTraits > & | out,
|  | const osmium::UndirectedSegment & | segment )

inline

Output UndirectedSegment to a stream.

## operator<<() [7/10]

template<typename TChar, typename TTraits>

std::basic_ostream< TChar, TTraits > & osmium::operator<< | ( | std::basic_ostream< TChar, TTraits > & | out,
|  | const StringMatcher & | matcher )

inline

## operator<<() [8/10]

template<typename TChar, typename TTraits>

std::basic_ostream< TChar, TTraits > & osmium::operator<< | ( | std::basic_ostream< TChar, TTraits > & | out,
|  | const Tag & | tag )

inline

Output a Tag to a stream.

## operator<<() [9/10]

template<typename TChar, typename TTraits>

std::basic_ostream< TChar, TTraits > & osmium::operator<< | ( | std::basic_ostream< TChar, TTraits > & | out,
|  | Timestamp | timestamp )

inline

## operator<=() [1/6]

bool osmium::operator<= | ( | const Changeset & | lhs,
|  | const Changeset & | rhs )

inline

## operator<=() [2/6]

bool osmium::operator<= | ( | const Location & | lhs,
|  | const Location & | rhs )

constexprnoexcept

## operator<=() [3/6]

bool osmium::operator<= | ( | const NodeRef & | lhs,
|  | const NodeRef & | rhs )

constexprnoexcept

Compare two NodeRefs. NodeRefs are ordered according to the Node ID they reference.

## operator<=() [4/6]

bool osmium::operator<= | ( | const OSMObject & | lhs,
|  | const OSMObject & | rhs )

inlinenoexcept

## operator<=() [5/6]

bool osmium::operator<= | ( | const Timestamp & | lhs,
|  | const Timestamp & | rhs )

inlinenoexcept

## operator<=() [6/6]

bool osmium::operator<= | ( | const UndirectedSegment & | lhs,
|  | const UndirectedSegment & | rhs )

inlinenoexcept

## operator==() [1/7]

bool osmium::operator== | ( | const Changeset & | lhs,
|  | const Changeset & | rhs )

inline

Changesets are equal if their IDs are equal.

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

bool osmium::operator== | ( | const Location & | lhs,
|  | const Location & | rhs )

constexprnoexcept

Locations are equal if both coordinates are equal.

## operator==() [3/7]

bool osmium::operator== | ( | const NodeRef & | lhs,
|  | const NodeRef & | rhs )

constexprnoexcept

Compare two NodeRefs. They are equal if they reference the same Node ID.

## operator==() [4/7]

bool osmium::operator== | ( | const OSMObject & | lhs,
|  | const OSMObject & | rhs )

inlinenoexcept

OSMObjects are equal if their type, id, and version are equal.

## operator==() [5/7]

bool osmium::operator== | ( | const Segment & | lhs,
|  | const Segment & | rhs )

constexprnoexcept

Segments are equal if both their locations are equal.

## operator==() [6/7]

bool osmium::operator== | ( | const Tag & | lhs,
|  | const Tag & | rhs )

inlinenoexcept

## operator==() [7/7]

bool osmium::operator== | ( | const Timestamp & | lhs,
|  | const Timestamp & | rhs )

inlinenoexcept

## operator>() [1/6]

bool osmium::operator> | ( | const Changeset & | lhs,
|  | const Changeset & | rhs )

inline

## operator>() [2/6]

bool osmium::operator> | ( | const Location & | lhs,
|  | const Location & | rhs )

constexprnoexcept

## operator>() [3/6]

bool osmium::operator> | ( | const NodeRef & | lhs,
|  | const NodeRef & | rhs )

constexprnoexcept

Compare two NodeRefs. NodeRefs are ordered according to the Node ID they reference.

## operator>() [4/6]

bool osmium::operator> | ( | const OSMObject & | lhs,
|  | const OSMObject & | rhs )

inlinenoexcept

## operator>() [5/6]

bool osmium::operator> | ( | const Timestamp & | lhs,
|  | const Timestamp & | rhs )

inlinenoexcept

## operator>() [6/6]

bool osmium::operator> | ( | const UndirectedSegment & | lhs,
|  | const UndirectedSegment & | rhs )

inlinenoexcept

## operator>=() [1/6]

bool osmium::operator>= | ( | const Changeset & | lhs,
|  | const Changeset & | rhs )

inline

## operator>=() [2/6]

bool osmium::operator>= | ( | const Location & | lhs,
|  | const Location & | rhs )

constexprnoexcept

## operator>=() [3/6]

bool osmium::operator>= | ( | const NodeRef & | lhs,
|  | const NodeRef & | rhs )

constexprnoexcept

Compare two NodeRefs. NodeRefs are ordered according to the Node ID they reference.

## operator>=() [4/6]

bool osmium::operator>= | ( | const OSMObject & | lhs,
|  | const OSMObject & | rhs )

inlinenoexcept

## operator>=() [5/6]

bool osmium::operator>= | ( | const Timestamp & | lhs,
|  | const Timestamp & | rhs )

inlinenoexcept

## operator>=() [6/6]

bool osmium::operator>= | ( | const UndirectedSegment & | lhs,
|  | const UndirectedSegment & | rhs )

inlinenoexcept

## opl_parse()

bool osmium::opl_parse | ( | const char * | data,
|  | osmium::memory::Buffer & | buffer )

inline

Parses one line in OPL format. The line must not have a newline character at the end. Buffer.commit() is called automatically if the write succeeded.

Parameters

  data | Line must be in this zero-delimited string.
  buffer | Result will be written to this buffer.

Returns
  true if an entity was parsed, false otherwise (for instance when the line is empty).

Exceptions

  osmium::opl_error | If the parsing fails.

## split_string() [1/2]

std::vector< std::string > osmium::split_string | ( | const std::string & | str,
|  | const char * | sep,
|  | bool | compact = false )

inline

Split string on any of the separator characters.

Parameters

  str | The string to be split.
  sep | The separator character(s).
  compact | Set this to true to remove empty strings from result.

Returns
  Vector with the parts of the string split up.

## split_string() [2/2]

std::vector< std::string > osmium::split_string | ( | const std::string & | str,
|  | const char | sep,
|  | bool | compact = false )

inline

Split string on the separator character.

Parameters

  str | The string to be split.
  sep | The separator character.
  compact | Set this to true to remove empty strings from result.

Returns
  Vector with the parts of the string split up.

## start_of_time()

Timestamp osmium::start_of_time | ( |  | ) |

constexprnoexcept

A special Timestamp guaranteed to be ordered before any other valid Timestamp.

## string_to_changeset_id()

changeset_id_type osmium::string_to_changeset_id | ( | const char * | input | ) |

inline

Convert string with changeset id to changeset_id_type.

Precondition
  input must not be nullptr.

Parameters

  input | Input string.

Exceptions

  std::range_error | if the value is out of range.

## string_to_num_changes()

num_changes_type osmium::string_to_num_changes | ( | const char * | input | ) |

inline

Convert string with number of changes to num_changes_type.

Precondition
  input must not be nullptr.

Parameters

  input | Input string.

Exceptions

  std::range_error | if the value is out of range.

## string_to_num_comments()

num_comments_type osmium::string_to_num_comments | ( | const char * | input | ) |

inline

Convert string with number of comments to num_comments_type.

Precondition
  input must not be nullptr.

Parameters

  input | Input string.

Exceptions

  std::range_error | if the value is out of range.

## string_to_object_id() [1/2]

object_id_type osmium::string_to_object_id | ( | const char * | input | ) |

inline

Convert string with object id to object_id_type.

Precondition
  input != nullptr

Parameters

  input | Input string.

Exceptions

  std::range_error | if the value is out of range.

## string_to_object_id() [2/2]

std::pair< osmium::item_type, osmium::object_id_type > osmium::string_to_object_id | ( | const char * | input,
|  | osmium::osm_entity_bits::type | types,
|  | osmium::item_type | default_type = osmium::item_type::undefined )

inline

Parse string with object type identifier followed by object id. This reads strings like "n1234" and "w10". If there is no type prefix, the default_type is returned.

Precondition
  input != nullptr
  types != osmium::osm_entity_bits::nothing
  osmium::osm_entity_bits::nothing
  @ nothing
  Definition entity_bits.hpp:67

Parameters

  input | Input string.
  types | Allowed types. Must not be osmium::osm_entity_bits::nothing.
  default_type | Type used when there is no type prefix.

Returns
  std::pair of type and id.

Exceptions

  std::range_error | if the value is out of range.

## string_to_object_version()

object_version_type osmium::string_to_object_version | ( | const char * | input | ) |

inline

Convert string with object version to object_version_type.

Precondition
  input must not be nullptr.

Parameters

  input | Input string.

Exceptions

  std::range_error | if the value is out of range.

## string_to_uid()

user_id_type osmium::string_to_uid | ( | const char * | input | ) |

inline

Convert string with user id to user_id_type.

Precondition
  input must not be nullptr.

Parameters

  input | Input string.

Exceptions

  std::range_error | if the value is out of range.