Libosmium
2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <header.hpp>
Public Member Functions | |
Header ()=default | |
Header (const std::initializer_list< osmium::Options::value_type > &values) | |
std::vector< osmium::Box > & | boxes () noexcept |
const std::vector< osmium::Box > & | boxes () const noexcept |
Header & | boxes (const std::vector< osmium::Box > &boxes) noexcept |
osmium::Box | box () const |
osmium::Box | joined_boxes () const |
Header & | add_box (const osmium::Box &box) |
bool | has_multiple_object_versions () const noexcept |
Header & | set_has_multiple_object_versions (bool value) noexcept |
Private Attributes | |
std::vector< osmium::Box > | m_boxes {} |
Bounding boxes. More... | |
bool | m_has_multiple_object_versions = false |
Meta information from the header of an OSM file.
The header can contain any number of bounding boxes, although usually there is only a single one (or none). PBF files only allow a single bounding box, but XML files can have multiple ones, although it is unusual and the semantics are unclear, so it is discouraged to create files with multiple bounding boxes.
The header contains a flag telling you whether this file can contain multiple versions of the same object. This is true for history files and for change files, but not for normal OSM data files. Not all OSM file formats can distinguish between those cases, so the flag might be wrong.
In addition the header can contain any number of key-value pairs with additional information. Most often this is used to set the "generator", the program that generated the file. Depending on the file format some of these key-value pairs are handled specially. See the Options parent class for details on how to set and get those key-value pairs.
|
default |
|
inline |
|
inline |
Add the given bounding box to the list of bounding boxes in the header.
|
inline |
Get the first (or only if there is only one) bounding box.
Returns an empty, invalid box if there is none.
|
inlinenoexcept |
Get the bounding boxes defined in the header.
|
inlinenoexcept |
Get the bounding boxes defined in the header.
|
inlinenoexcept |
Set all the bounding boxes in the header.
|
inlinenoexcept |
Can this file contain multiple versions of the same object?
|
inline |
Join up all the bounding boxes in the header into one and return it. This method is what you probably want to use unless you want to handle the possibly multiple bounding boxes yourself.
Returns an empty, invalid box if there is none.
|
inlinenoexcept |
Set the flag that tells us whether this file can contain multiple versions of the same object?
|
private |
Bounding boxes.
|
private |
Are there possibly multiple versions of the same object in this stream of objects? This should be true for history files and for change files, but not for normal OSM data files.