![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <NBPTStopCont.h>
Public Member Functions | |
void | addEdges2Keep (const OptionsCont &oc, std::set< std::string > &into) |
add edges that must be kept More... | |
void | alignIdSigns () |
void | assignEdgeForFloatingStops (NBEdgeCont &cont, double maxRadius) |
void | assignLanes (NBEdgeCont &cont) |
std::map< std::string, NBPTStop * >::const_iterator | begin () const |
Returns the pointer to the begin of the stored pt stops. More... | |
int | cleanupDeleted (NBEdgeCont &cont) |
remove stops on non existing (removed) edges More... | |
std::map< std::string, NBPTStop * >::const_iterator | end () const |
Returns the pointer to the end of the stored pt stops. More... | |
void | findAccessEdgesForRailStops (NBEdgeCont &cont, double maxRadius, int maxCount, double accessFactor) |
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 More... | |
NBPTStop * | get (std::string id) const |
Retrieve a previously inserted pt stop. More... | |
NBPTStop * | getReverseStop (NBPTStop *pStop, const NBEdgeCont &ec) |
const std::map< std::string, NBPTStop * > & | getStops () const |
bool | insert (NBPTStop *ptStop, bool floating=false) |
Inserts a node into the map. More... | |
void | localizePTStops (NBEdgeCont &cont) |
void | postprocess (std::set< std::string > &usedStops) |
void | replaceEdge (const std::string &edgeID, const EdgeVector &replacement) |
replace the edge with the closes edge on the given edge list in all stops More... | |
int | size () const |
Returns the number of pt stops stored in this container. More... | |
~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, NBPTStop * > | PTStopsCont |
Definition of the map of names to pt stops. More... | |
Private Member Functions | |
NBPTStop * | assignAndCreatNewPTStopAsNeeded (NBPTStop *pStop, NBEdgeCont &cont) |
void | assignPTStopToEdgeOfClosestPlatform (NBPTStop *pStop, NBEdgeCont &cont) |
double | computeCrossProductEdgePosition (const NBEdge *edge, const Position &closestPlatform) const |
const NBPTPlatform * | getClosestPlatformToPTStopPosition (NBPTStop *pStop) |
Static Private Member Functions | |
static std::string | getReverseID (const std::string &id) |
Private Attributes | |
std::vector< NBPTStop * > | myFloatingStops |
std::map< std::string, std::vector< NBPTStop * > > | myPTStopLookup |
The map of edge ids to stops. More... | |
PTStopsCont | myPTStops |
The map of names to pt stops. More... | |
Static Private Attributes | |
static std::set< std::string > | myIgnoredStops |
Definition at line 31 of file NBPTStopCont.h.
|
private |
Definition of the map of names to pt stops.
Definition at line 103 of file NBPTStopCont.h.
NBPTStopCont::~NBPTStopCont | ( | ) |
Definition at line 42 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 341 of file NBPTStopCont.cpp.
References myPTStops.
Referenced by NBRampsComputer::computeRamps(), and NBNodeCont::removeUnwishedNodes().
|
inlinestatic |
Definition at line 127 of file NBPTStopCont.h.
References myIgnoredStops.
Referenced by NIXMLPTHandler::addPTStop().
void NBPTStopCont::alignIdSigns | ( | ) |
Definition at line 386 of file NBPTStopCont.cpp.
References get(), NBPTStop::getEdgeId(), NBPTStop::getID(), getReverseID(), myPTStops, and NBPTStop::setPTStopId().
Referenced by NBNetBuilder::compute().
|
private |
Definition at line 198 of file NBPTStopCont.cpp.
References computeCrossProductEdgePosition(), NBEdgeCont::getByID(), NBPTStop::getEdgeId(), NBEdge::getID(), NBPTPlatform::getLength(), NBPTStop::getPlatformCands(), getReverseEdge(), getReverseStop(), NBPTStop::setEdgeId(), and NBPTStop::setPTStopLength().
Referenced by localizePTStops().
void NBPTStopCont::assignEdgeForFloatingStops | ( | NBEdgeCont & | cont, |
double | maxRadius | ||
) |
Definition at line 411 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 108 of file NBPTStopCont.cpp.
References NBPTStop::findLaneAndComputeBusStopExtent(), myPTStops, TL, and WRITE_WARNINGF.
Referenced by NBNetBuilder::compute().
|
private |
Definition at line 238 of file NBPTStopCont.cpp.
References computeCrossProductEdgePosition(), NBEdgeCont::getByID(), getClosestPlatformToPTStopPosition(), NBPTStop::getEdgeId(), NBEdge::getID(), NBPTPlatform::getLength(), NBPTPlatform::getPos(), getReverseEdge(), NBPTStop::setEdgeId(), and NBPTStop::setPTStopLength().
Referenced by localizePTStops().
|
inline |
Returns the pointer to the begin of the stored pt stops.
Definition at line 55 of file NBPTStopCont.h.
References myPTStops.
Referenced by NBNodeCont::joinJunctions(), NBNetBuilder::mirrorX(), NBNetBuilder::moveToOrigin(), and NWWriter_XML::writePTStops().
int NBPTStopCont::cleanupDeleted | ( | NBEdgeCont & | cont | ) |
remove stops on non existing (removed) edges
cont |
Definition at line 325 of file NBPTStopCont.cpp.
References NBEdgeCont::getByID(), myPTStops, TL, and WRITE_WARNINGF.
Referenced by NBNetBuilder::compute(), and NIImporter_OpenStreetMap::load().
|
private |
Definition at line 261 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().
|
inline |
Returns the pointer to the end of the stored pt stops.
Definition at line 62 of file NBPTStopCont.h.
References myPTStops.
Referenced by NBNodeCont::joinJunctions(), NBNetBuilder::mirrorX(), NBNetBuilder::moveToOrigin(), and NWWriter_XML::writePTStops().
void NBPTStopCont::findAccessEdgesForRailStops | ( | NBEdgeCont & | cont, |
double | maxRadius, | ||
int | maxCount, | ||
double | accessFactor | ||
) |
Definition at line 457 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().
NBPTStop * NBPTStopCont::findStop | ( | const std::string & | origEdgeID, |
Position | pos, | ||
double | threshold = 1 |
||
) | const |
Definition at line 510 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 126 of file NBPTStopCont.cpp.
References NBPTStop::findLaneAndComputeBusStopExtent(), NBEdgeCont::getByID(), NBPTStop::getEdgeId(), NBEdge::getID(), NBPTStop::getID(), NBPTStop::getLength(), NBPTStop::getName(), NBPTStop::getOrigEdgeId(), NBPTStop::getPermissions(), NBPTStop::getPosition(), getReverseID(), NBEdge::getTurnDestination(), NBEdge::isBidiRail(), myPTStops, NBPTStop::setBidiStop(), TL, toString(), WRITE_MESSAGE, and WRITE_WARNINGF.
Referenced by NBNetBuilder::compute().
NBPTStop * NBPTStopCont::get | ( | std::string | id | ) | const |
Retrieve a previously inserted pt stop.
Definition at line 66 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 293 of file NBPTStopCont.cpp.
References Position::distanceSquaredTo2D(), NBPTStop::getPlatformCands(), and NBPTStop::getPosition().
Referenced by assignPTStopToEdgeOfClosestPlatform().
Definition at line 310 of file NBPTStopCont.cpp.
References NBEdge::getFromNode(), NBNode::getOutgoingEdges(), and NBEdge::getToNode().
Referenced by assignAndCreatNewPTStopAsNeeded(), assignPTStopToEdgeOfClosestPlatform(), getReverseStop(), and NBPTLineCont::reviseStops().
|
staticprivate |
Definition at line 381 of file NBPTStopCont.cpp.
Referenced by alignIdSigns(), generateBidiStops(), and getReverseStop().
NBPTStop * NBPTStopCont::getReverseStop | ( | NBPTStop * | pStop, |
const NBEdgeCont & | ec | ||
) |
Definition at line 180 of file NBPTStopCont.cpp.
References NBEdgeCont::getByID(), NBPTStop::getEdgeId(), NBEdge::getID(), NBPTStop::getID(), NBPTStop::getLength(), NBPTStop::getName(), NBPTStop::getPermissions(), NBPTStop::getPosition(), getReverseEdge(), getReverseID(), and myPTStops.
Referenced by NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), assignAndCreatNewPTStopAsNeeded(), localizePTStops(), and NBPTLineCont::reviseStops().
|
inline |
Definition at line 66 of file NBPTStopCont.h.
References myPTStops.
Referenced by NBEdgeCont::appendRailwayTurnarounds(), NBNetBuilder::compute(), NIImporter_OpenStreetMap::load(), NBEdgeCont::remapIDs(), NBNodeCont::removeRailComponents(), and NBRailwayTopologyAnalyzer::reverseEdges().
bool NBPTStopCont::insert | ( | 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 51 of file NBPTStopCont.cpp.
References NBPTStop::getID(), 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 75 of file NBPTStopCont.cpp.
References assignAndCreatNewPTStopAsNeeded(), assignPTStopToEdgeOfClosestPlatform(), NBPTStop::getIsMultipleStopPositions(), NBPTStop::getPlatformCands(), getReverseStop(), insert(), and myPTStops.
Referenced by NBNetBuilder::compute().
void NBPTStopCont::postprocess | ( | std::set< std::string > & | usedStops | ) |
Definition at line 370 of file NBPTStopCont.cpp.
References myPTStops.
Referenced by NBNetBuilder::compute().
void NBPTStopCont::replaceEdge | ( | const std::string & | edgeID, |
const EdgeVector & | replacement | ||
) |
replace the edge with the closes edge on the given edge list in all stops
Definition at line 349 of file NBPTStopCont.cpp.
References myPTStopLookup, myPTStops, TL, and WRITE_WARNINGF.
Referenced by NBEdgeCont::joinTramEdges(), and NBNodeCont::removeUnwishedNodes().
|
inline |
Returns the number of pt stops stored in this container.
Definition at line 48 of file NBPTStopCont.h.
References myPTStops.
Referenced by NBNetBuilder::compute().
|
inlinestatic |
Definition at line 131 of file NBPTStopCont.h.
References myIgnoredStops.
Referenced by NIXMLPTHandler::addPTLineStop().
|
private |
Definition at line 111 of file NBPTStopCont.h.
Referenced by assignEdgeForFloatingStops(), and insert().
|
staticprivate |
Definition at line 121 of file NBPTStopCont.h.
Referenced by addIgnored(), and wasIgnored().
|
private |
The map of edge ids to stops.
Definition at line 109 of file NBPTStopCont.h.
Referenced by replaceEdge().
|
private |
The map of names to pt stops.
Definition at line 106 of file NBPTStopCont.h.
Referenced by addEdges2Keep(), alignIdSigns(), assignEdgeForFloatingStops(), assignLanes(), begin(), cleanupDeleted(), end(), findAccessEdgesForRailStops(), findStop(), generateBidiStops(), get(), getReverseStop(), getStops(), insert(), localizePTStops(), postprocess(), replaceEdge(), size(), and ~NBPTStopCont().