OSM
Namespaces | |
namespace | 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 | OscParser |
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 | |
using | Id = int64_t |
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 class | StringMemory { Persistent , Transient } |
enum class | 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) |
Element | lookupElement (const DataSet &dataSet, OSM::Type type, OSM::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) |
KOSM_EXPORT const char * | typeName (Type type) |
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
using OSM::Id = int64_t |
OSM element identifier.
Definition at line 30 of file datatypes.h.
Enumeration Type Documentation
◆ anonymous enum
◆ anonymous enum
◆ ForeachFlag
◆ StringMemory
|
strong |
Definition at line 17 of file stringpool.h.
◆ Type
|
strong |
Element type.
Definition at line 264 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() [1/2]
void OSM::assemblePath | ( | const DataSet & | dataSet, |
const std::vector< OSM::Element > & | ways, | ||
std::vector< const Node * > & | path ) |
Definition at line 61 of file pathutil.cpp.
◆ assemblePath() [2/2]
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() [1/2]
Utility function similar to SQL COALESCE for OSM::Element, ie.
this returns the first non-null element passed as argument.
◆ coalesce() [2/2]
◆ contains()
|
inlinenodiscardconstexpr |
Definition at line 160 of file datatypes.h.
◆ copy_element()
UniqueElement OSM::copy_element | ( | Element | e | ) |
Creates a copy of element
.
Definition at line 300 of file element.cpp.
◆ degToRad()
|
inlinenodiscardconstexpr |
◆ distance() [1/4]
|
nodiscard |
Distance between the given polygon and coordinate, in meter.
Definition at line 47 of file geomath.cpp.
◆ distance() [2/4]
|
nodiscard |
Distance between coord1
and coord2
in meter.
Definition at line 27 of file geomath.cpp.
◆ distance() [3/4]
|
nodiscard |
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]
|
nodiscard |
Distance between two coordinates.
Definition at line 16 of file geomath.cpp.
◆ for_each()
|
inline |
◆ for_each_member()
◆ for_each_node()
◆ intersects()
|
inlinenodiscardconstexpr |
Definition at line 154 of file datatypes.h.
◆ latitudeDistance()
|
inlinenodiscardconstexpr |
Definition at line 166 of file datatypes.h.
◆ longitudeDifference()
|
inlinenodiscardconstexpr |
Definition at line 171 of file datatypes.h.
◆ lookupElement()
◆ operator<() [1/2]
Definition at line 200 of file datatypes.h.
◆ operator<() [2/2]
Definition at line 201 of file datatypes.h.
◆ radToDeg()
|
inlinenodiscardconstexpr |
◆ removeTag()
|
inline |
Removes a tag from the given element.
Definition at line 501 of file datatypes.h.
◆ setTag()
|
inline |
Inserts a new tag, or replaces an existing one with the same key.
Definition at line 482 of file datatypes.h.
◆ setTagValue()
|
inline |
Inserts a new tag, or updates an existing one.
Definition at line 494 of file datatypes.h.
◆ tagValue() [1/3]
|
inlinenodiscard |
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 434 of file datatypes.h.
◆ tagValue() [2/3]
|
inlinenodiscard |
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 447 of file datatypes.h.
◆ tagValue() [3/3]
|
inlinenodiscard |
Returns the tag value for key
of elem
.
Definition at line 420 of file datatypes.h.
◆ typeName()
|
nodiscard |
Element type name.
Definition at line 11 of file datatypes.cpp.
◆ unite()
|
inlinenodiscardconstexpr |
Definition at line 138 of file datatypes.h.
◆ ztileFromBoundingBox()
ZTile OSM::ztileFromBoundingBox | ( | OSM::BoundingBox | bbox | ) |
Variable Documentation
◆ O5M_HEADER
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.