OSM::Element
#include <element.h>
Public Member Functions | |
Element (const Node *node) | |
Element (const Relation *relation) | |
Element (const Way *way) | |
BoundingBox | boundingBox () const |
Coordinate | center () const |
bool | hasTag (TagKey key) const |
bool | hasTags () const |
Id | id () const |
const Node * | node () const |
operator bool () const | |
bool | operator!= (Element other) const |
bool | operator< (Element other) const |
bool | operator== (Element other) const |
std::vector< const Node * > | outerPath (const DataSet &dataSet) const |
void | recomputeBoundingBox (const DataSet &dataSet) |
const Relation * | relation () const |
std::vector< Tag >::const_iterator | tagsBegin () const |
std::vector< Tag >::const_iterator | tagsEnd () const |
QByteArray | tagValue (const char *keyName) const |
QByteArray | tagValue (const OSM::Languages &languages, const char *keyName) const |
template<typename K , typename ... Args> | |
QByteArray | tagValue (const OSM::Languages &languages, K key, Args... args) const |
template<typename K , typename ... Args> | |
QByteArray | tagValue (K key, Args... args) const |
QByteArray | tagValue (TagKey key) const |
Type | type () const |
QString | url () const |
const Way * | way () const |
Detailed Description
A reference to any of OSM::Node/OSM::Way/OSM::Relation.
Lifetime of the referenced object needs to extend beyond the lifetime of this.
Constructor & Destructor Documentation
◆ Element() [1/4]
◆ Element() [2/4]
◆ Element() [3/4]
◆ Element() [4/4]
Member Function Documentation
◆ boundingBox()
|
nodiscard |
Definition at line 46 of file element.cpp.
◆ center()
|
nodiscard |
Definition at line 29 of file element.cpp.
◆ hasTag()
|
nodiscard |
Returns true
if this element has a tag with key key
.
Definition at line 114 of file element.cpp.
◆ hasTags()
|
inlinenodiscard |
◆ id()
|
nodiscard |
Definition at line 12 of file element.cpp.
◆ node()
◆ operator bool()
|
inlineexplicitnodiscard |
◆ operator!=()
|
inlinenodiscard |
◆ operator<()
|
inlinenodiscard |
◆ operator==()
|
inlinenodiscard |
◆ outerPath()
Returns all nodes belonging to the outer path of this element.
In the simplest case that's a single closed polygon, but it can also be a sequence of multiple closed loop polygons, or a polyline.
Definition at line 166 of file element.cpp.
◆ recomputeBoundingBox()
void Element::recomputeBoundingBox | ( | const DataSet & | dataSet | ) |
Recompute the bounding box of this element.
We usually assume those to be provided by Overpass/osmconvert, but there seem to be cases where those aren't reliable.
Definition at line 207 of file element.cpp.
◆ relation()
|
inlinenodiscard |
◆ tagsBegin()
|
nodiscard |
Definition at line 119 of file element.cpp.
◆ tagsEnd()
|
nodiscard |
Definition at line 134 of file element.cpp.
◆ tagValue() [1/5]
|
nodiscard |
Definition at line 80 of file element.cpp.
◆ tagValue() [2/5]
|
nodiscard |
Definition at line 97 of file element.cpp.
◆ tagValue() [3/5]
|
nodiscard |
◆ tagValue() [4/5]
|
nodiscard |
Returns the value of the first non-empty tag.
Both OSM::TagKey (fast) and const char* (slow) keys are accepted.
◆ tagValue() [5/5]
|
nodiscard |
Definition at line 63 of file element.cpp.
◆ type()
◆ url()
|
nodiscard |
Definition at line 149 of file element.cpp.
◆ way()
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:11:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.