OSM
Namespaces | |
XmlWriter | |
Classes | |
class | BoundingBox |
class | Coordinate |
class | DataSet |
class | DataSetMergeBuffer |
class | Element |
class | Member |
class | Node |
class | O5mParser |
class | OsmPbfParser |
class | OverpassQuery |
class | OverpassQueryManager |
class | Relation |
class | Role |
class | StringKey |
class | Tag |
class | TagKey |
class | UniqueElement |
class | Way |
class | ZTile |
Typedefs | |
typedef int64_t | Id |
Enumerations | |
enum | ForeachFlag : uint8_t { IncludeRelations = 1, IncludeWays = 2, IncludeNodes = 4, IterateAll = IncludeRelations | IncludeWays | IncludeNodes } |
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, std::vector< const Way * > &&ways, std::vector< const Node * > &path) |
KOSM_EXPORT void | assemblePath (const DataSet &dataSet, const std::vector< OSM::Element > &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 (double lat1, double lon1, double lat2, double lon2) |
KOSM_EXPORT double | distance (Coordinate coord1, Coordinate coord2) |
double | distance (Coordinate l1, Coordinate l2, Coordinate p) |
KOSM_EXPORT double | distance (const std::vector< const OSM::Node * > &path, Coordinate coord) |
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) |
constexpr bool | operator< (const Tag &lhs, TagKey rhs) |
constexpr bool | operator< (TagKey lhs, const Tag &rhs) |
template<typename Elem > | |
bool | operator< (const Elem &elem, Id id) |
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, const QByteArray &value) |
template<typename Elem > | |
QByteArray | tagValue (const Elem &elem, TagKey key) |
template<typename Elem > | |
QByteArray | tagValue (const Elem &elem, const char *keyName) |
template<typename Elem > | |
QByteArray | tagValue (const Elem &elem, const char *keyName, const QLocale &locale) |
constexpr BoundingBox | unite (BoundingBox bbox1, BoundingBox bbox2) |
ZTile | ztileFromBoundingBox (BoundingBox bbox) |
Detailed Description
Low-level types and functions to work with raw OSM data as efficiently as possible.
Typedef Documentation
typedef int64_t OSM::Id |
OSM element identifier.
Definition at line 26 of file datatypes.h.
Enumeration Type Documentation
|
strong |
Element type.
Definition at line 247 of file datatypes.h.
Function Documentation
|
static |
Appends the nodes referenced by nodesBegin
and into nodes
.
This would typically be iterators on OSM::Way::nodes.
Definition at line 24 of file pathutil.h.
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.
Utility function similar to SQL COALESCE for OSM::Element, ie.
this returns the first non-null element passed as argument.
UniqueElement OSM::copy_element | ( | Element | e | ) |
Creates a copy of element
.
Definition at line 300 of file element.cpp.
|
inline |
double OSM::distance | ( | double | lat1, |
double | lon1, | ||
double | lat2, | ||
double | lon2 | ||
) |
Distance between two coordinates.
Definition at line 17 of file geomath.cpp.
double OSM::distance | ( | Coordinate | coord1, |
Coordinate | coord2 | ||
) |
Distance between coord1
and coord2
in meter.
Definition at line 28 of file geomath.cpp.
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 33 of file geomath.cpp.
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 48 of file geomath.cpp.
|
inline |
|
inline |
Removes a tag from the given element.
Definition at line 470 of file datatypes.h.
|
inline |
Inserts a new tag, or replaces an existing one with the same key.
Definition at line 450 of file datatypes.h.
|
inline |
Inserts a new tag, or updates an existing one.
Definition at line 462 of file datatypes.h.
|
inline |
Returns the tag value for key
of elem
.
Definition at line 382 of file datatypes.h.
|
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 396 of file datatypes.h.
|
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 409 of file datatypes.h.
ZTile OSM::ztileFromBoundingBox | ( | OSM::BoundingBox | bbox | ) |
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jan 27 2021 23:02:51 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.