OSM
Namespaces | |
IO | |
Classes | |
class | AbstractReader |
class | AbstractWriter |
class | BoundingBox |
class | Coordinate |
class | DataSet |
class | DataSetMergeBuffer |
class | Element |
class | IOPluginInterface |
class | Languages |
class | Member |
class | Node |
class | O5mParser |
class | O5mWriter |
class | OsmPbfParser |
class | OsmPbfWriter |
class | OverpassQuery |
class | OverpassQueryManager |
class | Relation |
class | Role |
class | StringKey |
class | StringKeyRegistry |
class | StringKeyRegistryBase |
class | Tag |
class | TagKey |
class | UniqueElement |
class | Way |
class | XmlWriter |
class | ZTile |
Typedefs | |
typedef int64_t | Id |
Enumerations | |
enum | : uint8_t { O5M_BLOCK_RESET = 0xff, O5M_BLOCK_NODE = 0x10, O5M_BLOCK_WAY = 0x11, O5M_BLOCK_RELATION = 0x12, O5M_BLOCK_BOUNDING_BOX = 0xdb, O5M_BLOCK_TIMESTAMP = 0xdc, O5M_BLOCK_HEADER = 0xe0, O5M_NUMBER_CONTINUATION = 0b1000'0000, O5M_NUMBER_MASK = 0b0111'1111, O5M_NUMBER_SIGNED_BIT = 0b1, O5M_MEMTYPE_NODE = 0x30, O5M_MEMTYPE_WAY = 0x31, O5M_MEMTYPE_RELATION = 0x32, O5M_TRAILER = 0xfe } |
enum | : uint16_t { O5M_STRING_TABLE_SIZE = 15000, O5M_STRING_TABLE_MAXLEN = 250 } |
enum | ForeachFlag : uint8_t { IncludeRelations = 1, IncludeWays = 2, IncludeNodes = 4, IterateAll = IncludeRelations | IncludeWays | IncludeNodes } |
enum | StringMemory { Persistent, Transient } |
enum | Type : uint8_t { Null, Node, Way, Relation } |
Functions | |
template<typename Iter > | |
static void | appendNodesFromWay (const DataSet &dataSet, std::vector< const Node * > &nodes, const Iter &nodeBegin, const Iter &nodeEnd) |
KOSM_EXPORT void | assemblePath (const DataSet &dataSet, const std::vector< OSM::Element > &ways, std::vector< const Node * > &path) |
KOSM_EXPORT void | assemblePath (const DataSet &dataSet, std::vector< const Way * > &&ways, std::vector< const Node * > &path) |
constexpr Element | coalesce (Element e) |
template<typename ... Args> | |
constexpr Element | coalesce (Element e, Args... args) |
constexpr bool | contains (BoundingBox bbox, Coordinate coord) |
KOSM_EXPORT UniqueElement | copy_element (Element e) |
constexpr double | degToRad (double deg) |
KOSM_EXPORT double | distance (const std::vector< const OSM::Node * > &path, Coordinate coord) |
KOSM_EXPORT double | distance (Coordinate coord1, Coordinate coord2) |
double | distance (Coordinate l1, Coordinate l2, Coordinate p) |
KOSM_EXPORT double | distance (double lat1, double lon1, double lat2, double lon2) |
template<typename Func > | |
void | for_each (const DataSet &dataSet, Func func, uint8_t flags=IterateAll) |
template<typename Func > | |
void | for_each_member (const DataSet &dataSet, const Relation &rel, Func func) |
template<typename Func > | |
void | for_each_node (const DataSet &dataSet, const Way &way, Func func) |
constexpr bool | intersects (BoundingBox bbox1, BoundingBox bbox2) |
constexpr uint32_t | latitudeDistance (BoundingBox bbox1, BoundingBox bbox2) |
constexpr uint32_t | longitudeDifference (BoundingBox bbox1, BoundingBox bbox2) |
template<typename Elem > | |
bool | operator< (const Elem &elem, Id id) |
constexpr bool | operator< (const Tag &lhs, TagKey rhs) |
constexpr bool | operator< (TagKey lhs, const Tag &rhs) |
constexpr double | radToDeg (double rad) |
template<typename Elem > | |
void | removeTag (Elem &elem, TagKey key) |
template<typename Elem > | |
void | setTag (Elem &elem, Tag &&tag) |
template<typename Elem > | |
void | setTagValue (Elem &elem, TagKey key, QByteArray &&value) |
template<typename Elem > | |
QByteArray | tagValue (const Elem &elem, const char *keyName) |
template<typename Elem > | |
QByteArray | tagValue (const Elem &elem, const OSM::Languages &languages, const char *keyName) |
template<typename Elem > | |
QByteArray | tagValue (const Elem &elem, TagKey key) |
constexpr BoundingBox | unite (BoundingBox bbox1, BoundingBox bbox2) |
ZTile | ztileFromBoundingBox (BoundingBox bbox) |
Variables | |
constexpr const char | O5M_HEADER [] = "o5m2" |
Detailed Description
Low-level types and functions to work with raw OSM data as efficiently as possible.
Typedef Documentation
◆ Id
typedef int64_t OSM::Id |
OSM element identifier.
Definition at line 27 of file datatypes.h.
Enumeration Type Documentation
◆ Type
|
strong |
Element type.
Definition at line 262 of file datatypes.h.
Function Documentation
◆ appendNodesFromWay()
|
static |
Appends the nodes referenced by nodesBegin
and @pnodesEnd into nodes
.
This would typically be iterators on OSM::Way::nodes.
Definition at line 24 of file pathutil.h.
◆ assemblePath()
void OSM::assemblePath | ( | const DataSet & | dataSet, |
std::vector< const Way * > && | ways, | ||
std::vector< const Node * > & | path | ||
) |
Assemble a continuous path into path
from the given ways
.
Definition at line 42 of file pathutil.cpp.
◆ coalesce()
Utility function similar to SQL COALESCE for OSM::Element, ie.
this returns the first non-null element passed as argument.
◆ copy_element()
UniqueElement OSM::copy_element | ( | Element | e | ) |
Creates a copy of element
.
Definition at line 300 of file element.cpp.
◆ degToRad()
|
inlineconstexpr |
◆ distance() [1/4]
double OSM::distance | ( | const std::vector< const OSM::Node * > & | path, |
OSM::Coordinate | coord | ||
) |
Distance between the given polygon and coordinate, in meter.
Definition at line 47 of file geomath.cpp.
◆ distance() [2/4]
double OSM::distance | ( | Coordinate | coord1, |
Coordinate | coord2 | ||
) |
Distance between coord1
and coord2
in meter.
Definition at line 27 of file geomath.cpp.
◆ distance() [3/4]
double OSM::distance | ( | OSM::Coordinate | l1, |
OSM::Coordinate | l2, | ||
OSM::Coordinate | p | ||
) |
Distance in meters between a line segment defined by l1
and l2
to a point p
.
Definition at line 32 of file geomath.cpp.
◆ distance() [4/4]
double OSM::distance | ( | double | lat1, |
double | lon1, | ||
double | lat2, | ||
double | lon2 | ||
) |
Distance between two coordinates.
Definition at line 16 of file geomath.cpp.
◆ radToDeg()
|
inlineconstexpr |
◆ removeTag()
|
inline |
Removes a tag from the given element.
Definition at line 491 of file datatypes.h.
◆ setTag()
|
inline |
Inserts a new tag, or replaces an existing one with the same key.
Definition at line 472 of file datatypes.h.
◆ setTagValue()
|
inline |
Inserts a new tag, or updates an existing one.
Definition at line 484 of file datatypes.h.
◆ tagValue() [1/3]
|
inline |
Returns the tag value for key name keyName
of elem
.
- Warning
- This is slow due to doing a linear search and string comparissons. Where possible avoid this in favor of tagValue().
Definition at line 424 of file datatypes.h.
◆ tagValue() [2/3]
|
inline |
Returns the localized version of the tag value for key name keyName
of elem
.
- Warning
- This is slow due to doing a linear search and string comparissons.
Definition at line 437 of file datatypes.h.
◆ tagValue() [3/3]
|
inline |
Returns the tag value for key
of elem
.
Definition at line 410 of file datatypes.h.
◆ ztileFromBoundingBox()
ZTile OSM::ztileFromBoundingBox | ( | OSM::BoundingBox | bbox | ) |
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 3 2023 04:07:23 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.