![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Container for public transport stops during the net building process. More...
#include <NBPTStopCont.h>
Public Member Functions | |
| void | addEdges2Keep (const OptionsCont &oc, std::set< std::string > &into) |
| add edges that must be kept | |
| void | alignIdSigns () |
| void | assignEdgeForFloatingStops (NBEdgeCont &cont, double maxRadius) |
| void | assignLanes (NBEdgeCont &cont) |
| int | cleanupDeleted (NBEdgeCont &cont) |
| remove stops on non existing (removed) edges | |
| int | countBidiStops (NBEdgeCont &cont) const |
| count number of stop-pairs for superposed rail-edges | |
| void | findAccessEdgesForRailStops (NBEdgeCont &cont, double maxRadius, int maxCount, double accessFactor) |
| std::shared_ptr< NBPTStop > | findStop (const std::string &origEdgeID, Position pos, double threshold=1) const |
| int | generateBidiStops (NBEdgeCont &cont) |
| duplicate stops for superposed rail edges and return the number of generated stops | |
| std::shared_ptr< NBPTStop > | get (std::string id) const |
| Retrieve a previously inserted pt stop. | |
| std::shared_ptr< NBPTStop > | getReverseStop (std::shared_ptr< NBPTStop > pStop, const NBEdgeCont &ec) |
| const std::map< std::string, std::shared_ptr< NBPTStop > > & | getStops () const |
| Returns an unmodifiable reference to the stored pt stops. | |
| bool | insert (std::shared_ptr< NBPTStop > ptStop, bool floating=false) |
| Inserts a node into the map. | |
| void | localizePTStops (NBEdgeCont &cont) |
| void | postprocess (std::set< std::string > &usedStops) |
| void | replaceEdge (const std::string &edgeID, const std::vector< NBEdge * > &replacement) |
| replace the edge with the closes edge on the given edge list in all stops | |
| ~NBPTStopCont () | |
Static Public Member Functions | |
| static void | addIgnored (const std::string &stopID) |
| static NBEdge * | getReverseEdge (NBEdge *edge) |
| static bool | wasIgnored (const std::string &stopID) |
Private Types | |
| typedef std::map< std::string, std::shared_ptr< NBPTStop > > | PTStopsCont |
| Definition of the map of names to pt stops. | |
Private Member Functions | |
| std::shared_ptr< NBPTStop > | assignAndCreatNewPTStopAsNeeded (std::shared_ptr< NBPTStop > pStop, NBEdgeCont &cont) |
| void | assignPTStopToEdgeOfClosestPlatform (std::shared_ptr< NBPTStop > pStop, NBEdgeCont &cont) |
| double | computeCrossProductEdgePosition (const NBEdge *edge, const Position &closestPlatform) const |
| const NBPTPlatform * | getClosestPlatformToPTStopPosition (std::shared_ptr< NBPTStop > pStop) |
Static Private Member Functions | |
| static std::string | getReverseID (const std::string &id) |
Private Attributes | |
| std::vector< std::shared_ptr< NBPTStop > > | myFloatingStops |
| std::map< std::string, std::vector< std::shared_ptr< NBPTStop > > > | myPTStopLookup |
| The map of edge ids to stops. | |
| PTStopsCont | myPTStops |
| The map of names to pt stops. | |
Static Private Attributes | |
| static std::set< std::string > | myIgnoredStops |
Container for public transport stops during the net building process.
Definition at line 44 of file NBPTStopCont.h.
|
private |
Definition of the map of names to pt stops.
Definition at line 101 of file NBPTStopCont.h.
| NBPTStopCont::~NBPTStopCont | ( | ) |
Definition at line 43 of file NBPTStopCont.cpp.
References myPTStops.
| void NBPTStopCont::addEdges2Keep | ( | const OptionsCont & | oc, |
| std::set< std::string > & | into | ||
| ) |
add edges that must be kept
Definition at line 361 of file NBPTStopCont.cpp.
References myPTStops.
Referenced by NBRampsComputer::computeRamps(), and NBNodeCont::removeUnwishedNodes().
|
inlinestatic |
Definition at line 125 of file NBPTStopCont.h.
References myIgnoredStops.
Referenced by NIXMLPTHandler::addPTStop().
| void NBPTStopCont::alignIdSigns | ( | ) |
Definition at line 406 of file NBPTStopCont.cpp.
References get(), getReverseID(), and myPTStops.
Referenced by NBNetBuilder::compute().
|
private |
Definition at line 217 of file NBPTStopCont.cpp.
References computeCrossProductEdgePosition(), NBEdgeCont::getByID(), NBEdge::getID(), NBPTPlatform::getLength(), getReverseEdge(), and getReverseStop().
Referenced by localizePTStops().
| void NBPTStopCont::assignEdgeForFloatingStops | ( | NBEdgeCont & | cont, |
| double | maxRadius | ||
| ) |
Definition at line 434 of file NBPTStopCont.cpp.
References PositionVector::getBoxBoundary(), NBEdge::getGeometry(), NBEdge::getPermissions(), NamedRTree::Insert(), myFloatingStops, myPTStops, NamedRTree::Search(), SVC_BUS, SVC_RAIL, SVC_RAIL_URBAN, SVC_TAXI, SVC_TRAM, TL, WRITE_WARNINGF, Position::x(), Boundary::xmax(), Boundary::xmin(), Position::y(), Boundary::ymax(), and Boundary::ymin().
Referenced by NBNetBuilder::compute().
| void NBPTStopCont::assignLanes | ( | NBEdgeCont & | cont | ) |
Definition at line 105 of file NBPTStopCont.cpp.
References myPTStops, TL, and WRITE_WARNINGF.
Referenced by NBNetBuilder::compute().
|
private |
Definition at line 257 of file NBPTStopCont.cpp.
References computeCrossProductEdgePosition(), NBEdgeCont::getByID(), getClosestPlatformToPTStopPosition(), NBEdge::getID(), NBPTPlatform::getLength(), NBPTPlatform::getPos(), and getReverseEdge().
Referenced by localizePTStops().
| int NBPTStopCont::cleanupDeleted | ( | NBEdgeCont & | cont | ) |
remove stops on non existing (removed) edges
| cont |
Definition at line 345 of file NBPTStopCont.cpp.
References NBEdgeCont::getByID(), myPTStops, TL, and WRITE_WARNINGF.
Referenced by NBNetBuilder::compute(), and NIImporter_OpenStreetMap::load().
|
private |
Definition at line 280 of file NBPTStopCont.cpp.
References NBEdge::getGeometry(), NBEdge::getID(), PositionVector::indexOfClosest(), PositionVector::nearest_offset_to_point2D(), PositionVector::offsetAtIndex2D(), TL, WRITE_WARNINGF, Position::x(), and Position::y().
Referenced by assignAndCreatNewPTStopAsNeeded(), and assignPTStopToEdgeOfClosestPlatform().
| int NBPTStopCont::countBidiStops | ( | NBEdgeCont & | cont | ) | const |
count number of stop-pairs for superposed rail-edges
Definition at line 178 of file NBPTStopCont.cpp.
References NBEdgeCont::getByID(), NBEdge::getID(), getReverseID(), NBEdge::getTurnDestination(), NBEdge::isBidiRail(), and myPTStops.
Referenced by NBNetBuilder::compute().
| void NBPTStopCont::findAccessEdgesForRailStops | ( | NBEdgeCont & | cont, |
| double | maxRadius, | ||
| int | maxCount, | ||
| double | accessFactor | ||
| ) |
Definition at line 480 of file NBPTStopCont.cpp.
References Position::distanceTo2D(), NBEdgeCont::getByID(), NBEdge::getPermissions(), NamedRTree::Insert(), myPTStops, NamedRTree::Search(), SVC_PEDESTRIAN, Position::x(), Boundary::xmax(), Boundary::xmin(), Position::y(), Boundary::ymax(), and Boundary::ymin().
Referenced by NBNetBuilder::compute().
| std::shared_ptr< NBPTStop > NBPTStopCont::findStop | ( | const std::string & | origEdgeID, |
| Position | pos, | ||
| double | threshold = 1 |
||
| ) | const |
Definition at line 533 of file NBPTStopCont.cpp.
References myPTStops.
Referenced by NBPTLineCont::findWay().
| int NBPTStopCont::generateBidiStops | ( | NBEdgeCont & | cont | ) |
duplicate stops for superposed rail edges and return the number of generated stops
Definition at line 123 of file NBPTStopCont.cpp.
References NBEdgeCont::getByID(), NBEdge::getID(), getReverseID(), NBEdge::getTurnDestination(), NBEdge::isBidiRail(), myPTStops, TL, toString(), WRITE_MESSAGEF, and WRITE_WARNINGF.
Referenced by NBNetBuilder::compute().
| std::shared_ptr< NBPTStop > NBPTStopCont::get | ( | std::string | id | ) | const |
Retrieve a previously inserted pt stop.
Definition at line 64 of file NBPTStopCont.cpp.
References myPTStops.
Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), NIXMLPTHandler::addPTLineStop(), NIXMLPTHandler::addRouteStop(), alignIdSigns(), NBPTLine::deleteInvalidStops(), and NIImporter_OpenStreetMap::insertEdge().
|
private |
Definition at line 312 of file NBPTStopCont.cpp.
References Position::distanceSquaredTo2D().
Referenced by assignPTStopToEdgeOfClosestPlatform().
Definition at line 329 of file NBPTStopCont.cpp.
References NBEdge::getFromNode(), NBEdge::getGeometry(), NBNode::getOutgoingEdges(), NBEdge::getToNode(), and PositionVector::reverse().
Referenced by assignAndCreatNewPTStopAsNeeded(), assignPTStopToEdgeOfClosestPlatform(), getReverseStop(), and NBPTLineCont::reviseStops().
|
staticprivate |
Definition at line 401 of file NBPTStopCont.cpp.
Referenced by alignIdSigns(), countBidiStops(), generateBidiStops(), and getReverseStop().
| std::shared_ptr< NBPTStop > NBPTStopCont::getReverseStop | ( | std::shared_ptr< NBPTStop > | pStop, |
| const NBEdgeCont & | ec | ||
| ) |
Definition at line 199 of file NBPTStopCont.cpp.
References NBEdgeCont::getByID(), NBEdge::getID(), getReverseEdge(), getReverseID(), and myPTStops.
Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), assignAndCreatNewPTStopAsNeeded(), localizePTStops(), and NBPTLineCont::reviseStops().
|
inline |
Returns an unmodifiable reference to the stored pt stops.
Definition at line 62 of file NBPTStopCont.h.
References myPTStops.
Referenced by NBEdgeCont::appendRailwayTurnarounds(), NBNetBuilder::compute(), NBRailwaySignalGuesser::guessByStops(), NBNodeCont::joinJunctions(), NIImporter_OpenStreetMap::load(), NBNetBuilder::mirrorX(), NBNetBuilder::moveToOrigin(), NBEdgeCont::remapIDs(), NBNodeCont::removeRailComponents(), NBRailwayTopologyAnalyzer::reverseEdges(), and NWWriter_XML::writePTStops().
| bool NBPTStopCont::insert | ( | std::shared_ptr< NBPTStop > | ptStop, |
| bool | floating = false |
||
| ) |
Inserts a node into the map.
| [in] | stop | The pt stop to insert |
| [in] | floating | whether the stop is not referenced by a way or relation |
Definition at line 49 of file NBPTStopCont.cpp.
References myFloatingStops, and myPTStops.
Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), NIXMLPTHandler::addPTStop(), NBPTLineCont::findWay(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::load(), localizePTStops(), NIImporter_VISUM::parse_stopPoints(), and NBPTLineCont::reviseStops().
| void NBPTStopCont::localizePTStops | ( | NBEdgeCont & | cont | ) |
Definition at line 73 of file NBPTStopCont.cpp.
References assignAndCreatNewPTStopAsNeeded(), assignPTStopToEdgeOfClosestPlatform(), getReverseStop(), insert(), and myPTStops.
Referenced by NBNetBuilder::compute().
| void NBPTStopCont::postprocess | ( | std::set< std::string > & | usedStops | ) |
Definition at line 390 of file NBPTStopCont.cpp.
References myPTStops.
Referenced by NBNetBuilder::compute().
| void NBPTStopCont::replaceEdge | ( | const std::string & | edgeID, |
| const std::vector< NBEdge * > & | replacement | ||
| ) |
replace the edge with the closes edge on the given edge list in all stops
Definition at line 369 of file NBPTStopCont.cpp.
References myPTStopLookup, myPTStops, TL, and WRITE_WARNINGF.
Referenced by NBEdgeCont::joinTramEdges(), and NBNodeCont::removeUnwishedNodes().
|
inlinestatic |
Definition at line 129 of file NBPTStopCont.h.
References myIgnoredStops.
Referenced by NIXMLPTHandler::addPTLineStop().
|
private |
Definition at line 109 of file NBPTStopCont.h.
Referenced by assignEdgeForFloatingStops(), and insert().
|
staticprivate |
Definition at line 119 of file NBPTStopCont.h.
Referenced by addIgnored(), and wasIgnored().
|
private |
The map of edge ids to stops.
Definition at line 107 of file NBPTStopCont.h.
Referenced by replaceEdge().
|
private |
The map of names to pt stops.
Definition at line 104 of file NBPTStopCont.h.
Referenced by addEdges2Keep(), alignIdSigns(), assignEdgeForFloatingStops(), assignLanes(), cleanupDeleted(), countBidiStops(), findAccessEdgesForRailStops(), findStop(), generateBidiStops(), get(), getReverseStop(), getStops(), insert(), localizePTStops(), postprocess(), replaceEdge(), and ~NBPTStopCont().