Eclipse SUMO - Simulation of Urban MObility
|
Instance responsible for building networks. More...
#include <NBNetBuilder.h>
Data Structures | |
class | by_id_sorter |
Sorts nodes by their ids. More... | |
Public Member Functions | |
void | applyOptions (OptionsCont &oc) |
Initialises the storage by applying given options. | |
void | compute (OptionsCont &oc, const std::set< std::string > &explicitTurnarounds=std::set< std::string >(), bool mayAddOrRemove=true) |
Performs the network building steps. | |
bool | haveNetworkCrossings () |
notify about style of loaded network (Without Crossings) | |
NBNetBuilder () | |
Constructor. | |
void | setHaveNetworkCrossings (bool value) |
enable crossing in networks | |
~NBNetBuilder () | |
Destructor. | |
Retrieval of subcontainers | |
Returns a reference to edge container | |
NBEdgeCont & | getEdgeCont () |
NBNodeCont & | getNodeCont () |
Returns a reference to the node container. | |
NBTypeCont & | getTypeCont () |
Returns a reference to the type container. | |
NBTrafficLightLogicCont & | getTLLogicCont () |
Returns a reference to the traffic light logics container. | |
NBDistrictCont & | getDistrictCont () |
Returns a reference the districts container. | |
NBPTStopCont & | getPTStopCont () |
Returns a reference to the pt stop container. | |
NBPTLineCont & | getPTLineCont () |
Returns a reference to the pt line container. | |
NBParkingCont & | getParkingCont () |
ShapeContainer & | getShapeCont () |
Static Public Member Functions | |
static int | addGeometrySegments (PositionVector &from, const PositionVector &cartesian, const double maxLength) |
insertion geometry points to ensure maximum segment length between points | |
static bool | runningNetedit () |
whether netbuilding takes place in the context of netedit | |
static bool | transformCoordinate (Position &from, bool includeInBoundary=true, GeoConvHelper *from_srs=nullptr) |
transforms loaded coordinates handles projections, offsets (using GeoConvHelper) and import of height data (using NBHeightMapper) | |
static bool | transformCoordinates (PositionVector &from, bool includeInBoundary=true, GeoConvHelper *from_srs=nullptr) |
Protected Attributes | |
NBDistrictCont | myDistrictCont |
The used container for districts. | |
NBEdgeCont | myEdgeCont |
The used container for edges. | |
bool | myNetworkHaveCrossings |
flag to indicate that network has crossings | |
NBNodeCont | myNodeCont |
The used container for nodes. | |
NBParkingCont | myParkingCont |
NBPTLineCont | myPTLineCont |
The used container for pt stops. | |
NBPTStopCont | myPTStopCont |
The used container for pt stops. | |
ShapeContainer | myShapeCont |
container for loaded polygon data | |
NBTrafficLightLogicCont | myTLLCont |
The used container for traffic light logics. | |
NBTypeCont | myTypeCont |
The used container for street types. | |
Private Member Functions | |
void | mirrorX () |
mirror the network along the X-axis | |
void | moveToOrigin (GeoConvHelper &geoConvHelper, bool lefthand) |
shift network so its lower left corner is at 0,0 | |
NBNetBuilder (const NBNetBuilder &s) | |
invalidated copy constructor | |
NBNetBuilder & | operator= (const NBNetBuilder &s) |
invalidated assignment operator | |
Friends | |
class | GNENet |
Instance responsible for building networks.
The class' - and the netbuild module's - functionality is embedded within the compute() method.
Definition at line 107 of file NBNetBuilder.h.
NBNetBuilder::NBNetBuilder | ( | ) |
Constructor.
Definition at line 55 of file NBNetBuilder.cpp.
NBNetBuilder::~NBNetBuilder | ( | ) |
Destructor.
Definition at line 61 of file NBNetBuilder.cpp.
|
private |
invalidated copy constructor
|
static |
insertion geometry points to ensure maximum segment length between points
Definition at line 833 of file NBNetBuilder.cpp.
Referenced by NIImporter_SUMO::_loadNetwork(), NGEdge::buildNBEdge(), transformCoordinates(), and NIXMLEdgesHandler::tryGetShape().
void NBNetBuilder::applyOptions | ( | OptionsCont & | oc | ) |
Initialises the storage by applying given options.
Options, mainly steering the acceptance of edges, are parsed and the according internal variables are set.
[in] | oc | The options container to read options from |
ProcessError | If something fails (message is included) |
Definition at line 65 of file NBNetBuilder.cpp.
References NBEdgeCont::applyOptions(), NBTrafficLightLogicCont::applyOptions(), StringBijection< T >::get(), OptionsCont::getFloat(), OptionsCont::getInt(), OptionsCont::getString(), SUMOXMLDefinitions::LaneSpreadFunctions, myEdgeCont, myTLLCont, myTypeCont, parseVehicleClasses(), NBEdge::setDefaultConnectionLength(), and NBTypeCont::setEdgeTypeDefaults().
Referenced by main(), and GNELoadThread::run().
void NBNetBuilder::compute | ( | OptionsCont & | oc, |
const std::set< std::string > & | explicitTurnarounds = std::set<std::string>() , |
||
bool | mayAddOrRemove = true |
||
) |
Performs the network building steps.
[in] | oc | Container that contains options for building |
[in] | explicitTurnarounds | List of edge ids for which turn-arounds should be added (used by netedit) |
[in] | mayAddOrRemove | whether processing steps which cause nodes and edges to be added or removed shall be triggered (used by netedit) |
ProcessError | (recheck) |
Definition at line 79 of file NBNetBuilder.cpp.
References Boundary::add(), NBNodeCont::addJoinExclusion(), NBPTStopCont::alignIdSigns(), NBRailwayTopologyAnalyzer::analyzeTopology(), NBEdgeCont::appendRailwayTurnarounds(), NBEdgeCont::appendTurnarounds(), NBTrafficLightLogicCont::applyOpenDriveControllers(), NBPTStopCont::assignEdgeForFloatingStops(), NBPTStopCont::assignLanes(), NBNodeCont::avoidOverlap(), NBEdgeCont::begin(), NBNodeCont::begin(), NBEdgeCont::checkGeometries(), NBEdgeCont::checkGrade(), NBEdgeCont::checkOverlap(), NBPTStopCont::cleanupDeleted(), NBEdgeCont::cleanupRoundabouts(), NBEdgeCont::computeAngles(), NBEdgeCont::computeEdge2Edges(), NBEdgePriorityComputer::computeEdgePriorities(), NBEdgeCont::computeEdgeShapes(), GeoConvHelper::computeFinal(), NBNodeCont::computeKeepClear(), NBEdgeCont::computeLanes2Edges(), NBNodeCont::computeLanes2Lanes(), NBEdgeCont::computeLaneShapes(), NBNodeCont::computeLogics(), NBTrafficLightLogicCont::computeLogics(), NBNodeCont::computeLogics2(), NBNodeCont::computeNodeShapes(), NBNodeTypeComputer::computeNodeTypes(), NBRampsComputer::computeRamps(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirections(), DEG2RAD, NBEdgeCont::end(), NBNodeCont::end(), OptionsCont::exists(), NBRailwayTopologyAnalyzer::extendDirectionPriority(), NBPTStopCont::findAccessEdgesForRailStops(), NBPTLineCont::fixBidiStops(), NBPTLineCont::fixPermissions(), NBEdgeCont::fixSplitCustomLength(), NBPTStopCont::generateBidiStops(), NBEdgeCont::generateStreetSigns(), StringBijection< T >::get(), OptionsCont::getBool(), GeoConvHelper::getConvBoundary(), SysUtils::getCurrentMillis(), OptionsCont::getFloat(), OptionsCont::getInt(), NBEdge::getLaneSpeed(), NBPTLineCont::getLines(), NBEdgeCont::getNumEdgeSplits(), NBEdge::getNumLanes(), GeoConvHelper::getProcessing(), NBEdgeCont::getRoundabouts(), NBPTLineCont::getServedPTStops(), NBPTStopCont::getStops(), OptionsCont::getString(), OptionsCont::getStringVector(), Boundary::getZRange(), NBNodeCont::guessFringe(), NBEdgeCont::guessOpposites(), NBRailwaySignalGuesser::guessRailSignals(), NBEdgeCont::guessRoundabouts(), NBEdgeCont::guessSpecialLanes(), NBNodeCont::guessTLs(), NBEdgeCont::hasGuessedRoundabouts(), OptionsCont::isDefault(), OptionsCont::isSet(), NBNodeCont::joinJunctions(), NBEdgeCont::joinLanes(), NBNodeCont::joinLoadedClusters(), NBNodeCont::joinSameJunctions(), NBNodeCont::joinSimilarEdges(), NBNodeCont::joinTLS(), NBEdgeCont::joinTramEdges(), NBPTStopCont::localizePTStops(), NBRailwayTopologyAnalyzer::makeAllBidi(), NBEdgeCont::markRoundabouts(), MAX2(), MIN2(), NBTrafficLightDefinition::MIN_YELLOW_SECONDS, mirrorX(), moveToOrigin(), myDistrictCont, myEdgeCont, myNetworkHaveCrossings, myNodeCont, myParkingCont, myPTLineCont, myPTStopCont, myTLLCont, NBTrafficLightDefinition::OSM_DIRECTION, parseVehicleClasses(), NBPTStopCont::postprocess(), NBPTLineCont::process(), PROGRESS_BEGIN_MESSAGE, PROGRESS_BEGIN_TIME_MESSAGE, PROGRESS_DONE_MESSAGE, PROGRESS_TIME_MESSAGE, NBNodeCont::recheckGuessedTLS(), NBEdgeCont::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NBEdgeCont::reduceGeometries(), NBEdgeCont::remapIDs(), NBNodeCont::remapIDs(), NBNodeCont::removeComponents(), NBEdgeCont::removeEdgesByPermissions(), NBEdgeCont::removeEdgesBySpeed(), NBPTLineCont::removeInvalidEdges(), NBNodeCont::removeIsolatedRoads(), NBEdgeCont::removeLanesByWidth(), NBNodeCont::removeRailComponents(), NBNodeCont::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBRailwayTopologyAnalyzer::repairTopology(), NBRequest::reportWarnings(), NBNodeCont::resetNodeShapes(), OptionsCont::resetWritable(), NBNodeCont::retrieve(), OptionsCont::set(), NBNodeCont::setAsTLControlled(), GeoConvHelper::setConvBoundary(), NBTrafficLightLogicCont::setOpenDriveSignalParameters(), NBEdge::setSpeed(), NBTrafficLightLogicCont::setTLControllingInformation(), NBNodesEdgesSorter::sortNodesEdges(), NBEdgeCont::sortOutgoingLanesConnections(), NBEdgeCont::splitGeometry(), NBRailwayGeometryHelper::straigthenCorrdidor(), SVC_BICYCLE, SVC_IGNORING, SVC_PEDESTRIAN, TL, toString(), SUMOXMLDefinitions::TrafficLightTypes, NBEdgeCont::updateAllChangeRestrictions(), NBNodeTypeComputer::validateRailCrossings(), WRITE_MESSAGEF, WRITE_WARNING, WRITE_WARNINGF, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by GNENet::computeAndUpdate(), main(), and GNELoadThread::run().
|
inline |
Returns a reference the districts container.
Definition at line 159 of file NBNetBuilder.h.
References myDistrictCont.
Referenced by NIImporter_SUMO::_loadNetwork(), NIImporter_VISUM::buildDistrictNode(), NBRampsComputer::computeRamps(), NILoader::load(), NIImporter_DlrNavteq::loadNetwork(), NILoader::loadXML(), NIImporter_VISUM::parse_Connectors(), NIImporter_VISUM::parse_Connectors_legacy(), NIImporter_VISUM::parse_Districts(), NIImporter_VISUM::parse_Lanes(), NIImporter_Vissim::postLoadBuild(), NGNet::toNB(), NWWriter_XML::writeNetwork(), and NWWriter_SUMO::writeNetwork().
|
inline |
Definition at line 139 of file NBNetBuilder.h.
References myEdgeCont.
Referenced by NIImporter_SUMO::_loadNetwork(), NBRampsComputer::computeRamps(), GNENet::getEdgeCont(), NIImporter_VISUM::getNamedEdge(), NIImporter_VISUM::getNamedEdgeContinuating(), NIImporter_VISUM::getReversedContinuating(), GNENet::initJunctionsAndEdges(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_VISUM::load(), NIImporter_OpenStreetMap::load(), NILoader::load(), NIImporter_ArcView::loadNetwork(), NIImporter_DlrNavteq::loadNetwork(), NIImporter_MATSim::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), NILoader::loadXML(), main(), NIImporter_VISUM::parse_Connectors_legacy(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_stopPoints(), NIImporter_VISUM::parse_TurnsToSignalGroups(), GNEPathManager::PathCalculator::PathCalculator(), NIImporter_Vissim::postLoadBuild(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NIImporter_OpenDrive::retrieveSignalEdges(), GNELoadThread::run(), GNENet::selectRoundabout(), GNEJunction::setAttribute(), NGNet::toNB(), NWWriter_XML::writeNetwork(), NWWriter_Amitran::writeNetwork(), NWWriter_DlrNavteq::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), and NWWriter_SUMO::writeNetwork().
|
inline |
Returns a reference to the node container.
Definition at line 144 of file NBNetBuilder.h.
References myNodeCont.
Referenced by NIImporter_VISUM::buildDistrictNode(), NGEdge::buildNBEdge(), NBRampsComputer::computeRamps(), NIImporter_VISUM::getNamedNode(), NIImporter_VISUM::getNamedNodeSecure(), GNENet::initJunctionsAndEdges(), NIImporter_OpenStreetMap::insertEdge(), GNENet::joinSelectedJunctions(), NIImporter_OpenStreetMap::load(), NILoader::load(), NIImporter_ArcView::loadNetwork(), NIImporter_DlrNavteq::loadNetwork(), NIImporter_MATSim::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), NILoader::loadXML(), main(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_Nodes(), NIImporter_VISUM::parse_NodesToTrafficLights(), NIImporter_Vissim::postLoadBuild(), NIImporter_OpenStreetMap::reconstructLayerElevation(), GNELoadThread::run(), GNENet::saveJoined(), NGNet::toNB(), NWWriter_XML::writeNetwork(), NWWriter_Amitran::writeNetwork(), NWWriter_DlrNavteq::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), and NWWriter_SUMO::writeNetwork().
|
inline |
Definition at line 173 of file NBNetBuilder.h.
References myParkingCont.
Referenced by NBRampsComputer::computeRamps(), NIImporter_OpenStreetMap::insertEdge(), and NWWriter_XML::writeNetwork().
|
inline |
Returns a reference to the pt line container.
Definition at line 169 of file NBNetBuilder.h.
References myPTLineCont.
Referenced by NIImporter_OpenStreetMap::load(), NILoader::loadXML(), and NWWriter_XML::writeNetwork().
|
inline |
Returns a reference to the pt stop container.
Definition at line 164 of file NBNetBuilder.h.
References myPTStopCont.
Referenced by NBRampsComputer::computeRamps(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::load(), NILoader::loadXML(), NIImporter_VISUM::parse_stopPoints(), and NWWriter_XML::writeNetwork().
|
inline |
Definition at line 177 of file NBNetBuilder.h.
References myShapeCont.
Referenced by NILoader::loadXML(), and NWWriter_OpenDrive::writeNetwork().
|
inline |
Returns a reference to the traffic light logics container.
Definition at line 154 of file NBNetBuilder.h.
References myTLLCont.
Referenced by NGNode::buildNBNode(), GNENet::getTLLogicCont(), NIImporter_OpenDrive::getTLSSecure(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_VISUM::load(), NIImporter_OpenStreetMap::load(), NILoader::load(), NIImporter_DlrNavteq::loadNetwork(), NILoader::loadXML(), main(), NIImporter_Vissim::postLoadBuild(), NGNet::toNB(), NWWriter_XML::writeNetwork(), and NWWriter_SUMO::writeNetwork().
|
inline |
Returns a reference to the type container.
Definition at line 149 of file NBNetBuilder.h.
References myTypeCont.
Referenced by NGEdge::buildNBEdge(), GNENet::initJunctionsAndEdges(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::load(), NILoader::load(), NIImporter_ArcView::loadNetwork(), NIImporter_DlrNavteq::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), NILoader::loadXML(), main(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_Types(), GNENet::saveEdgeTypes(), GNENet::saveNetwork(), NWWriter_XML::writeNetwork(), and NWWriter_SUMO::writeNetwork().
|
inline |
notify about style of loaded network (Without Crossings)
Definition at line 183 of file NBNetBuilder.h.
References myNetworkHaveCrossings.
Referenced by GNEJunction::rebuildGNECrossings(), GNEChange_Crossing::redo(), and GNEChange_Crossing::undo().
|
private |
mirror the network along the X-axis
Definition at line 758 of file NBNetBuilder.cpp.
References NBDistrictCont::begin(), NBEdgeCont::begin(), NBNodeCont::begin(), NBDistrictCont::end(), NBEdgeCont::end(), NBNodeCont::end(), NBPTStopCont::getStops(), myDistrictCont, myEdgeCont, myNodeCont, and myPTStopCont.
Referenced by compute().
|
private |
shift network so its lower left corner is at 0,0
Definition at line 732 of file NBNetBuilder.cpp.
References NBDistrictCont::begin(), NBEdgeCont::begin(), NBNodeCont::begin(), NBDistrictCont::end(), NBEdgeCont::end(), NBNodeCont::end(), GeoConvHelper::getConvBoundary(), NBPTStopCont::getStops(), GeoConvHelper::moveConvertedBy(), myDistrictCont, myEdgeCont, myNodeCont, myPTStopCont, PROGRESS_BEGIN_TIME_MESSAGE, PROGRESS_TIME_MESSAGE, TL, Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().
Referenced by compute().
|
private |
invalidated assignment operator
|
static |
whether netbuilding takes place in the context of netedit
Definition at line 855 of file NBNetBuilder.cpp.
References OptionsCont::exists(), and OptionsCont::getOptions().
Referenced by NBLoadedSUMOTLDef::reconstructLogic().
|
inline |
enable crossing in networks
Definition at line 188 of file NBNetBuilder.h.
References myNetworkHaveCrossings.
Referenced by NIImporter_SUMO::_loadNetwork(), GNEJunction::invalidateTLS(), GNEChange_Crossing::redo(), and GNEChange_Crossing::undo().
|
static |
transforms loaded coordinates handles projections, offsets (using GeoConvHelper) and import of height data (using NBHeightMapper)
[in,out] | from | The coordinate to be transformed |
[in] | includeInBoundary | Whether to patch the convex boundary of the GeoConvHelper default instance |
[in] | from_srs | The spatial reference system of the input coordinate |
Definition at line 776 of file NBNetBuilder.cpp.
References GeoConvHelper::cartesian2geo(), NBHeightMapper::get(), GeoConvHelper::getLoaded(), GeoConvHelper::getNumLoaded(), GeoConvHelper::getOffset(), GeoConvHelper::getProcessing(), NBHeightMapper::getZ(), NBHeightMapper::ready(), Position::set(), Position::setz(), GeoConvHelper::usingGeoProjection(), Position::x(), GeoConvHelper::x2cartesian(), Position::y(), and Position::z().
Referenced by NIImporter_SUMO::addJunction(), NIXMLNodesHandler::addNode(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::insertNodeChecking(), NIImporter_ArcView::load(), NIImporter_OpenStreetMap::load(), NIImporter_ITSUMO::Handler::myEndElement(), NIImporter_OpenStreetMap::RelationHandler::myEndElement(), NIImporter_MATSim::NodesHandler::myStartElement(), NIVissimAbstractEdge::NIVissimAbstractEdge(), NIImporter_VISUM::parse_Districts(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Nodes(), NIImporter_VISUM::parse_Point(), NIImporter_DlrNavteq::NodesHandler::report(), and transformCoordinates().
|
static |
Definition at line 814 of file NBNetBuilder.cpp.
References addGeometrySegments(), OptionsCont::getFloat(), OptionsCont::getOptions(), and transformCoordinate().
Referenced by NIImporter_SUMO::addConnection(), NIXMLConnectionsHandler::addCrossing(), NIImporter_SUMO::addEdge(), NIImporter_SUMO::addJunction(), NIImporter_SUMO::addLane(), NIXMLEdgesHandler::addLane(), NIXMLConnectionsHandler::addWalkingArea(), NIImporter_OpenDrive::computeShapes(), NIImporter_OpenStreetMap::extendRailwayDistances(), NBEdgeCont::ignoreFilterMatch(), NIImporter_OpenStreetMap::insertEdge(), NIXMLConnectionsHandler::parseLaneBound(), NIXMLNodesHandler::processNodeType(), and NIXMLEdgesHandler::tryGetShape().
Definition at line 108 of file NBNetBuilder.h.
|
protected |
The used container for districts.
Definition at line 240 of file NBNetBuilder.h.
Referenced by compute(), getDistrictCont(), mirrorX(), and moveToOrigin().
|
protected |
The used container for edges.
Definition at line 234 of file NBNetBuilder.h.
Referenced by applyOptions(), compute(), getEdgeCont(), mirrorX(), and moveToOrigin().
|
protected |
flag to indicate that network has crossings
Definition at line 254 of file NBNetBuilder.h.
Referenced by compute(), haveNetworkCrossings(), and setHaveNetworkCrossings().
|
protected |
The used container for nodes.
Definition at line 228 of file NBNetBuilder.h.
Referenced by compute(), getNodeCont(), mirrorX(), and moveToOrigin().
|
protected |
Definition at line 248 of file NBNetBuilder.h.
Referenced by compute(), and getParkingCont().
|
protected |
The used container for pt stops.
Definition at line 246 of file NBNetBuilder.h.
Referenced by compute(), and getPTLineCont().
|
protected |
The used container for pt stops.
Definition at line 243 of file NBNetBuilder.h.
Referenced by compute(), getPTStopCont(), mirrorX(), and moveToOrigin().
|
protected |
container for loaded polygon data
Definition at line 251 of file NBNetBuilder.h.
Referenced by getShapeCont().
|
protected |
The used container for traffic light logics.
Definition at line 237 of file NBNetBuilder.h.
Referenced by applyOptions(), compute(), and getTLLogicCont().
|
protected |
The used container for street types.
Definition at line 231 of file NBNetBuilder.h.
Referenced by applyOptions(), and getTypeCont().