Eclipse SUMO - Simulation of Urban MObility
NBNetBuilder Class Reference

Instance responsible for building networks. More...

#include <NBNetBuilder.h>

Collaboration diagram for NBNetBuilder:

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. More...
 
void compute (OptionsCont &oc, const std::set< std::string > &explicitTurnarounds=std::set< std::string >(), bool mayAddOrRemove=true)
 Performs the network building steps. More...
 
NBParkingContgetParkingCont ()
 
ShapeContainergetShapeCont ()
 
bool haveNetworkCrossings ()
 notify about style of loaded network (Without Crossings) More...
 
 NBNetBuilder ()
 Constructor. More...
 
void setHaveNetworkCrossings (bool value)
 enable crossing in networks More...
 
 ~NBNetBuilder ()
 Destructor. More...
 
Retrieval of subcontainers

Updates the shape for a single Node

Parameters
[in]ocContainer that contains options for building
[in]explicitTurnaroundsList of edge ids for which turn-arounds should be added (used by NETEDIT)
[in]mayAddOrRemovewhether processing steps which cause nodes and edges to be added or removed shall be triggered (used by netedit)
Exceptions
ProcessError(recheck)

Returns a reference to edge container

NBEdgeContgetEdgeCont ()
 
NBNodeContgetNodeCont ()
 Returns a reference to the node container. More...
 
NBTypeContgetTypeCont ()
 Returns a reference to the type container. More...
 
NBTrafficLightLogicContgetTLLogicCont ()
 Returns a reference to the traffic light logics container. More...
 
NBDistrictContgetDistrictCont ()
 Returns a reference the districts container. More...
 
NBPTStopContgetPTStopCont ()
 Returns a reference to the pt stop container. More...
 
NBPTLineContgetPTLineCont ()
 Returns a reference to the pt line container. More...
 

Static Public Member Functions

static bool runningNetedit ()
 whether netbuilding takes place in the context of NETEDIT More...
 
static bool transformCoordinate (Position &from, bool includeInBoundary=true, GeoConvHelper *from_srs=0)
 transforms loaded coordinates handles projections, offsets (using GeoConvHelper) and import of height data (using NBHeightMapper) More...
 
static bool transformCoordinates (PositionVector &from, bool includeInBoundary=true, GeoConvHelper *from_srs=0)
 

Protected Attributes

NBDistrictCont myDistrictCont
 The used container for districts. More...
 
NBEdgeCont myEdgeCont
 The used container for edges. More...
 
bool myNetworkHaveCrossings
 flag to indicate that network has crossings More...
 
NBNodeCont myNodeCont
 The used container for nodes. More...
 
NBParkingCont myParkingCont
 
NBPTLineCont myPTLineCont
 The used container for pt stops. More...
 
NBPTStopCont myPTStopCont
 The used container for pt stops. More...
 
ShapeContainer myShapeCont
 container for loaded polygon data More...
 
NBTrafficLightLogicCont myTLLCont
 The used container for traffic light logics. More...
 
NBTypeCont myTypeCont
 The used container for street types. More...
 

Private Member Functions

void mirrorX ()
 mirror the network along the X-axis More...
 
void moveToOrigin (GeoConvHelper &geoConvHelper, bool lefthand)
 shift network so its lower left corner is at 0,0 More...
 
 NBNetBuilder (const NBNetBuilder &s)
 invalidated copy constructor More...
 
NBNetBuilderoperator= (const NBNetBuilder &s)
 invalidated assignment operator More...
 

Friends

class GNENet
 

Detailed Description

Instance responsible for building networks.

The class' - and the netbuild module's - functionality is embedded within the compute() method.

Definition at line 110 of file NBNetBuilder.h.

Constructor & Destructor Documentation

◆ NBNetBuilder() [1/2]

NBNetBuilder::NBNetBuilder ( )

Constructor.

Definition at line 56 of file NBNetBuilder.cpp.

◆ ~NBNetBuilder()

NBNetBuilder::~NBNetBuilder ( )

Destructor.

Definition at line 62 of file NBNetBuilder.cpp.

◆ NBNetBuilder() [2/2]

NBNetBuilder::NBNetBuilder ( const NBNetBuilder s)
private

invalidated copy constructor

Member Function Documentation

◆ applyOptions()

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.

Parameters
[in]ocThe options container to read options from
Exceptions
ProcessErrorIf something fails (message is included)

Definition at line 66 of file NBNetBuilder.cpp.

References NBTrafficLightLogicCont::applyOptions(), NBEdgeCont::applyOptions(), OptionsCont::getFloat(), OptionsCont::getInt(), OptionsCont::getString(), myEdgeCont, myTLLCont, myTypeCont, parseVehicleClasses(), and NBTypeCont::setDefaults().

Referenced by main().

◆ compute()

void NBNetBuilder::compute ( OptionsCont oc,
const std::set< std::string > &  explicitTurnarounds = std::set<std::string>(),
bool  mayAddOrRemove = true 
)

Performs the network building steps.

Parameters
[in]ocContainer that contains options for building
[in]explicitTurnaroundsList of edge ids for which turn-arounds should be added (used by NETEDIT)
[in]mayAddOrRemovewhether processing steps which cause nodes and edges to be added or removed shall be triggered (used by netedit)
Exceptions
ProcessError(recheck)

Definition at line 78 of file NBNetBuilder.cpp.

References Boundary::add(), NBNodeCont::addJoinExclusion(), NBPTStopCont::alignIdSigns(), NBRailwayTopologyAnalyzer::analyzeTopology(), NBEdgeCont::appendRailwayTurnarounds(), NBEdgeCont::appendTurnarounds(), NBPTStopCont::assignLanes(), NBNodeCont::avoidOverlap(), NBNodeCont::begin(), NBEdgeCont::begin(), NBEdgeCont::checkGeometries(), NBEdgeCont::checkGrade(), NBEdgeCont::checkOverlap(), NBEdgeCont::computeEdge2Edges(), NBEdgePriorityComputer::computeEdgePriorities(), NBEdgeCont::computeEdgeShapes(), GeoConvHelper::computeFinal(), NBEdgeCont::computeLanes2Edges(), NBNodeCont::computeLanes2Lanes(), NBEdgeCont::computeLaneShapes(), NBTrafficLightLogicCont::computeLogics(), NBNodeCont::computeLogics(), NBNodeCont::computeLogics2(), NBNodeCont::computeNodeShapes(), NBNodeTypeComputer::computeNodeTypes(), NBRampsComputer::computeRamps(), NBTurningDirectionsComputer::computeTurnDirections(), DEG2RAD, NBNodeCont::end(), NBEdgeCont::end(), OptionsCont::exists(), NBPTStopCont::findAccessEdgesForRailStops(), NBPTLineCont::fixBidiStops(), NBPTStopCont::generateBidiStops(), NBEdgeCont::generateStreetSigns(), StringBijection< T >::get(), OptionsCont::getBool(), GeoConvHelper::getConvBoundary(), SysUtils::getCurrentMillis(), OptionsCont::getFloat(), OptionsCont::getInt(), GeoConvHelper::getOffsetBase(), GeoConvHelper::getOrigBoundary(), GeoConvHelper::getProcessing(), NBEdgeCont::getRoundabouts(), NBPTLineCont::getServedPTStops(), NBPTStopCont::getStops(), OptionsCont::getString(), OptionsCont::getStringVector(), Boundary::getZRange(), NBEdgeCont::guessOpposites(), NBEdgeCont::guessRoundabouts(), NBEdgeCont::guessSpecialLanes(), NBNodeCont::guessTLs(), OptionsCont::isDefault(), OptionsCont::isSet(), NBNodeCont::joinJunctions(), NBEdgeCont::joinLanes(), NBNodeCont::joinLoadedClusters(), NBNodeCont::joinSimilarEdges(), NBNodeCont::joinTLS(), NBPTStopCont::localizePTStops(), NBRailwayTopologyAnalyzer::makeAllBidi(), NBEdgeCont::markRoundabouts(), MAX2(), MIN2(), mirrorX(), moveToOrigin(), myDistrictCont, myEdgeCont, myNetworkHaveCrossings, myNodeCont, myParkingCont, myPTLineCont, myPTStopCont, myTLLCont, NBPTStopCont::postprocess(), NBNodeCont::printBuiltNodesStatistics(), NBPTLineCont::process(), PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, PROGRESS_TIME_MESSAGE, NBEdgeCont::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NBEdgeCont::reduceGeometries(), NBNodeCont::remapIDs(), NBEdgeCont::remapIDs(), NBNodeCont::removeComponents(), NBNodeCont::removeIsolatedRoads(), NBNodeCont::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBRailwayTopologyAnalyzer::repairTopology(), NBRequest::reportWarnings(), OptionsCont::resetWritable(), NBNodeCont::retrieve(), OptionsCont::set(), NBNodeCont::setAsTLControlled(), GeoConvHelper::setConvBoundary(), NBTrafficLightLogicCont::setTLControllingInformation(), NBNodesEdgesSorter::sortNodesEdges(), NBEdgeCont::sortOutgoingLanesConnections(), NBEdgeCont::splitGeometry(), SVC_BICYCLE, SVC_IGNORING, SVC_PEDESTRIAN, toString(), SUMOXMLDefinitions::TrafficLightTypes, NBNodeTypeComputer::validateRailCrossings(), WRITE_MESSAGE, WRITE_WARNING, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().

Referenced by GNENet::computeAndUpdate(), and main().

◆ getDistrictCont()

◆ getEdgeCont()

NBEdgeCont& NBNetBuilder::getEdgeCont ( )
inline

Definition at line 151 of file NBNetBuilder.h.

References myEdgeCont.

Referenced by NIImporter_SUMO::_loadNetwork(), NBRailwayTopologyAnalyzer::addBidiEdge(), NBRailwayTopologyAnalyzer::addBidiEdgesForStops(), NBRailwayTopologyAnalyzer::addBidiEdgesForStraightConnectivity(), NBRampsComputer::computeRamps(), GNENet::deleteSingleEdge(), NBRailwayTopologyAnalyzer::extendBidiEdges(), GNENet::getEdgeCont(), NIImporter_VISUM::getNamedEdge(), NIImporter_VISUM::getNamedEdgeContinuating(), NBRailwayTopologyAnalyzer::getRailNodes(), NIImporter_VISUM::getReversedContinuating(), GNENet::initJunctionsAndEdges(), NIImporter_OpenStreetMap::insertEdge(), GNENet::insertEdge(), NILoader::load(), NIImporter_VISUM::load(), NIImporter_OpenStreetMap::load(), NIImporter_RobocupRescue::loadNetwork(), NIImporter_ArcView::loadNetwork(), NIImporter_DlrNavteq::loadNetwork(), NIImporter_MATSim::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), NILoader::loadXML(), main(), NBRailwayTopologyAnalyzer::makeAllBidi(), NIImporter_VISUM::parse_Connectors(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIImporter_Vissim::postLoadBuild(), NIImporter_OpenStreetMap::reconstructLayerElevation(), GNENet::renameEdge(), NBRailwayTopologyAnalyzer::reverseEdges(), GNEDemandElement::RouteCalculator::RouteCalculator(), GNEJunction::setAttribute(), NGNet::toNB(), NWWriter_Amitran::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), NWWriter_DlrNavteq::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_XML::writeNetwork(), and NWWriter_SUMO::writeNetwork().

◆ getNodeCont()

◆ getParkingCont()

NBParkingCont& NBNetBuilder::getParkingCont ( )
inline

◆ getPTLineCont()

NBPTLineCont& NBNetBuilder::getPTLineCont ( )
inline

◆ getPTStopCont()

NBPTStopCont& NBNetBuilder::getPTStopCont ( )
inline

◆ getShapeCont()

ShapeContainer& NBNetBuilder::getShapeCont ( )
inline

Definition at line 191 of file NBNetBuilder.h.

References myShapeCont.

Referenced by NILoader::loadXML(), and NWWriter_OpenDrive::writeNetwork().

◆ getTLLogicCont()

◆ getTypeCont()

◆ haveNetworkCrossings()

bool NBNetBuilder::haveNetworkCrossings ( )
inline

notify about style of loaded network (Without Crossings)

Definition at line 196 of file NBNetBuilder.h.

References myNetworkHaveCrossings.

Referenced by GNEJunction::rebuildGNECrossings(), GNEChange_Crossing::redo(), and GNEChange_Crossing::undo().

◆ mirrorX()

void NBNetBuilder::mirrorX ( )
private

◆ moveToOrigin()

◆ operator=()

NBNetBuilder& NBNetBuilder::operator= ( const NBNetBuilder s)
private

invalidated assignment operator

◆ runningNetedit()

bool NBNetBuilder::runningNetedit ( )
static

whether netbuilding takes place in the context of NETEDIT

Definition at line 726 of file NBNetBuilder.cpp.

References OptionsCont::exists(), and OptionsCont::getOptions().

Referenced by NBLoadedSUMOTLDef::reconstructLogic().

◆ setHaveNetworkCrossings()

void NBNetBuilder::setHaveNetworkCrossings ( bool  value)
inline

enable crossing in networks

Definition at line 201 of file NBNetBuilder.h.

References myNetworkHaveCrossings.

Referenced by GNEChange_Crossing::redo(), and GNEChange_Crossing::undo().

◆ transformCoordinate()

bool NBNetBuilder::transformCoordinate ( Position from,
bool  includeInBoundary = true,
GeoConvHelper from_srs = 0 
)
static

◆ transformCoordinates()

Friends And Related Function Documentation

◆ GNENet

friend class GNENet
friend

Definition at line 111 of file NBNetBuilder.h.

Field Documentation

◆ myDistrictCont

NBDistrictCont NBNetBuilder::myDistrictCont
protected

The used container for districts.

Definition at line 250 of file NBNetBuilder.h.

Referenced by compute(), getDistrictCont(), mirrorX(), and moveToOrigin().

◆ myEdgeCont

NBEdgeCont NBNetBuilder::myEdgeCont
protected

The used container for edges.

Definition at line 244 of file NBNetBuilder.h.

Referenced by applyOptions(), compute(), getEdgeCont(), mirrorX(), and moveToOrigin().

◆ myNetworkHaveCrossings

bool NBNetBuilder::myNetworkHaveCrossings
protected

flag to indicate that network has crossings

Definition at line 264 of file NBNetBuilder.h.

Referenced by compute(), haveNetworkCrossings(), and setHaveNetworkCrossings().

◆ myNodeCont

NBNodeCont NBNetBuilder::myNodeCont
protected

The used container for nodes.

Definition at line 238 of file NBNetBuilder.h.

Referenced by compute(), getNodeCont(), mirrorX(), and moveToOrigin().

◆ myParkingCont

NBParkingCont NBNetBuilder::myParkingCont
protected

Definition at line 258 of file NBNetBuilder.h.

Referenced by compute(), and getParkingCont().

◆ myPTLineCont

NBPTLineCont NBNetBuilder::myPTLineCont
protected

The used container for pt stops.

Definition at line 256 of file NBNetBuilder.h.

Referenced by compute(), and getPTLineCont().

◆ myPTStopCont

NBPTStopCont NBNetBuilder::myPTStopCont
protected

The used container for pt stops.

Definition at line 253 of file NBNetBuilder.h.

Referenced by compute(), getPTStopCont(), and moveToOrigin().

◆ myShapeCont

ShapeContainer NBNetBuilder::myShapeCont
protected

container for loaded polygon data

Definition at line 261 of file NBNetBuilder.h.

Referenced by getShapeCont().

◆ myTLLCont

NBTrafficLightLogicCont NBNetBuilder::myTLLCont
protected

The used container for traffic light logics.

Definition at line 247 of file NBNetBuilder.h.

Referenced by applyOptions(), compute(), and getTLLogicCont().

◆ myTypeCont

NBTypeCont NBNetBuilder::myTypeCont
protected

The used container for street types.

Definition at line 241 of file NBNetBuilder.h.

Referenced by applyOptions(), and getTypeCont().


The documentation for this class was generated from the following files: