OSM::Element

Search for usage in LXR

OSM::Element Class Reference

#include <element.h>

Public Member Functions

 Element (const Node *node)
 
 Element (const Relation *relation)
 
 Element (const Way *way)
 
BoundingBox boundingBox () const
 
Coordinate center () const
 
const Nodenode () const
 
std::vector< const Node * > outerPath (const DataSet &dataSet) const
 
void recomputeBoundingBox (const DataSet &dataSet)
 
const Relationrelation () const
 
QString tagValue (const char *key) const
 
QString tagValue (const QLatin1String &key) const
 
Type type () const
 
QString url () const
 
const Wayway () 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.

Definition at line 36 of file element.h.

Member Function Documentation

◆ outerPath()

std::vector< const Node * > Element::outerPath ( const DataSet dataSet) const

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 119 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 173 of file element.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Oct 6 2022 03:57:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.