KOSMIndoorMap
platform.cpp
82 static void appendSection(std::vector<PlatformSection> §ions, const Platform &p, PlatformSection &&sec, std::vector<const OSM::Node*> &edgePath, const OSM::DataSet &dataSet);
83 static double maxSectionDistance(const Platform &p, const std::vector<PlatformSection> §ions, const OSM::DataSet &dataSet);
254 return std::find_if(path.begin(), path.end(), [node](auto n) { return n->id == node; }) != path.end();
261static double maxSectionDistance(const std::vector<const OSM::Node*> &path, const std::vector<PlatformSection> §ions)
270double PlatformPrivate::maxSectionDistance(const Platform &p, const std::vector<PlatformSection> §ions, const OSM::DataSet &dataSet)
285 // ### this assumes multi-polygons are structured in the way the Marble generator normalizes them!
334 // ### this assumes multi-polygons are structured in the way the Marble generator normalizes them!
350static bool isConnectedWay(const std::vector<OSM::Element> &lhs, const std::vector<OSM::Element> &rhs, const OSM::DataSet &dataSet)
359static bool isOverlappingWay(const std::vector<OSM::Element> &lhs, const std::vector<OSM::Element> &rhs)
379 if ((conflictIfPresent(lhs.d->m_stopPoint, rhs.d->m_stopPoint) && lhs.d->m_track != rhs.d->m_track && !isConnectedTrack)
382 || (!lhs.d->m_track.empty() && !rhs.d->m_track.empty() && !isOverlappingTrack && !isConnectedTrack)
389 // we can accept conflicting names if one of them is likely a station name instead of a platform name
398 if ((lhs.d->m_area && rhs.d->m_edge.type() == OSM::Type::Way && !isSubPath(lhs.d->m_area.outerPath(dataSet), *rhs.d->m_edge.way()))
399 || (rhs.d->m_area && lhs.d->m_edge.type() == OSM::Type::Way && !isSubPath(rhs.d->m_area.outerPath(dataSet), *lhs.d->m_edge.way()))) {
413 // track/stop and area/edge elements do not share nodes, so those we need to match by spatial distance
415 return OSM::distance(lhs.d->m_edge.outerPath(dataSet), rhs.position()) < MAX_TRACK_TO_EDGE_DISTANCE;
418 return OSM::distance(rhs.d->m_edge.outerPath(dataSet), lhs.position()) < MAX_TRACK_TO_EDGE_DISTANCE;
424 return OSM::distance(lhs.d->m_area.outerPath(dataSet), rhs.position()) < MAX_TRACK_TO_EDGE_DISTANCE;
427 return OSM::distance(rhs.d->m_area.outerPath(dataSet), lhs.position()) < MAX_TRACK_TO_EDGE_DISTANCE;
454void PlatformPrivate::appendSection(std::vector<PlatformSection> §ions, const Platform &p, PlatformSection &&sec, std::vector<const OSM::Node*> &edgePath, const OSM::DataSet &dataSet)
476static std::vector<OSM::Element> mergeWays(const std::vector<OSM::Element> &lhs, const std::vector<OSM::Element> &rhs)
500 p.d->m_lines = lhs.d->m_lines.isEmpty() ? std::move(rhs.d->m_lines) : std::move(lhs.d->m_lines);
static Platform merge(const Platform &lhs, const Platform &rhs, const OSM::DataSet &dataSet)
Merge two platform objects.
Definition platform.cpp:487
static QString preferredName(const QString &lhs, const QString &rhs)
Returns the preferred platform name given two possible alternatives.
Definition platform.cpp:547
QStringList lines() const
Names of public transport lines stopping at this platform.
Definition platform.cpp:224
const std::vector< OSM::Element > & track() const
The (railway) track this platform is serving.
Definition platform.cpp:168
static bool isPlausibleName(const QString &name)
Checks if name is a plausible name for a platform.
Definition platform.cpp:541
static bool isSame(const Platform &lhs, const Platform &rhs, const OSM::DataSet &dataSet)
Checks if two instances refer to the same platform.
Definition platform.cpp:368
OSM::Coordinate position() const
A singular position for this platform (typically the stop position).
Definition platform.cpp:130
const std::vector< PlatformSection > & sections() const
Platform sections.
Definition platform.cpp:185
Coordinate, stored as 1e7 * degree to avoid floating point precision issues, and offset to unsigned v...
Definition datatypes.h:37
void stop(Ekos::AlignState mode)
QString path(const QString &relativePath)
OSM-based multi-floor indoor maps for buildings.
Definition locationqueryoverlayproxymodel.h:20
KOSM_EXPORT double distance(double lat1, double lon1, double lat2, double lon2)
Distance between two coordinates.
Definition geomath.cpp:16
constexpr Element coalesce(Element e)
Utility function similar to SQL COALESCE for OSM::Element, ie.
Definition element.h:141
KOSM_EXPORT void 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 pathutil.cpp:42
QRegularExpressionMatch match(QStringView subjectView, qsizetype offset, MatchType matchType, MatchOptions matchOptions) const const
bool hasMatch() const const
iterator end()
bool isEmpty() const const
qsizetype size() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.