SUMO - Simulation of Urban MObility
NBNetBuilder Class Reference

Instance responsible for building networks. More...

#include <NBNetBuilder.h>

Collaboration diagram for NBNetBuilder:
Collaboration graph

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...
 
void haveLoadedNetworkWithoutInternalEdges ()
 notify about style of loaded network (Without internal edges More...
 
bool haveNetworkCrossings ()
 notify about style of loaded network (Without Crossings) More...
 
 NBNetBuilder ()
 Constructor. More...
 
 ~NBNetBuilder ()
 Destructor. More...
 
Retrieval of subcontainers

Returns a reference to edge container

NBEdgeCont & getEdgeCont ()
 
NBNodeCont & getNodeCont ()
 Returns a reference to the node container. More...
 
NBTypeCont & getTypeCont ()
 Returns a reference to the type container. More...
 
NBTrafficLightLogicCont & getTLLogicCont ()
 Returns a reference to the traffic light logics container. More...
 
NBDistrictCont & getDistrictCont ()
 Returns a reference the districts container. More...
 

Static Public Member Functions

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 myHaveLoadedNetworkWithoutInternalEdges
 whether a .net.xml without internal edges was loaded More...
 
bool myNetworkHaveCrossings
 flag to indicate that network has crossings More...
 
NBNodeCont myNodeCont
 The used container for nodes. 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...
 
NBNetBuilder & operator= (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 112 of file NBNetBuilder.h.

Constructor & Destructor Documentation

NBNetBuilder::NBNetBuilder ( )

Constructor.

Definition at line 67 of file NBNetBuilder.cpp.

NBNetBuilder::~NBNetBuilder ( )

Destructor.

Definition at line 74 of file NBNetBuilder.cpp.

NBNetBuilder::NBNetBuilder ( const NBNetBuilder &  s)
private

invalidated copy constructor

Member Function Documentation

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 78 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().

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 90 of file NBNetBuilder.cpp.

References Boundary::add(), NBNodeCont::addJoinExclusion(), NBEdgeCont::appendTurnarounds(), 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::computeNodeShapes(), NBNodeTypeComputer::computeNodeTypes(), NBRampsComputer::computeRamps(), NBTurningDirectionsComputer::computeTurnDirections(), DEG2RAD, NBNodeCont::end(), NBEdgeCont::end(), OptionsCont::exists(), NBEdgeCont::generateStreetSigns(), StringBijection< T >::get(), OptionsCont::getBool(), GeoConvHelper::getConvBoundary(), SysUtils::getCurrentMillis(), OptionsCont::getFloat(), GeoConvHelper::getOffsetBase(), GeoConvHelper::getOrigBoundary(), GeoConvHelper::getProcessing(), NBEdgeCont::getRoundabouts(), OptionsCont::getString(), OptionsCont::getStringVector(), Boundary::getZRange(), NBEdgeCont::guessOpposites(), NBEdgeCont::guessRoundabouts(), NBEdgeCont::guessSidewalks(), NBNodeCont::guessTLs(), OptionsCont::isDefault(), OptionsCont::isSet(), NBNodeCont::joinJunctions(), NBNodeCont::joinLoadedClusters(), NBNodeCont::joinSimilarEdges(), NBNodeCont::joinTLS(), NBEdgeCont::markRoundabouts(), MAX2(), MIN2(), mirrorX(), moveToOrigin(), myDistrictCont, myEdgeCont, myHaveLoadedNetworkWithoutInternalEdges, myNetworkHaveCrossings, myNodeCont, myTLLCont, NBNodeCont::printBuiltNodesStatistics(), PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, PROGRESS_TIME_MESSAGE, NBEdgeCont::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NBEdgeCont::reduceGeometries(), NBNodeCont::remapIDs(), NBEdgeCont::remapIDs(), NBNodeCont::removeIsolatedRoads(), NBNodeCont::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBRequest::reportWarnings(), OptionsCont::resetWritable(), NBNodeCont::retrieve(), OptionsCont::set(), NBNodeCont::setAsTLControlled(), GeoConvHelper::setConvBoundary(), NBTrafficLightLogicCont::setTLControllingInformation(), NBNodesEdgesSorter::sortNodesEdges(), NBEdgeCont::sortOutgoingLanesConnections(), NBEdgeCont::splitGeometry(), SUMOReal, toString(), SUMOXMLDefinitions::TrafficLightTypes, WRITE_MESSAGE, WRITE_WARNING, Boundary::xmax(), Boundary::xmin(), Boundary::ymax(), and Boundary::ymin().

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

void NBNetBuilder::haveLoadedNetworkWithoutInternalEdges ( )
inline

notify about style of loaded network (Without internal edges

Definition at line 170 of file NBNetBuilder.h.

References myHaveLoadedNetworkWithoutInternalEdges.

Referenced by NIImporter_SUMO::_loadNetwork().

bool NBNetBuilder::haveNetworkCrossings ( )
inline

notify about style of loaded network (Without Crossings)

Definition at line 175 of file NBNetBuilder.h.

References myNetworkHaveCrossings, transformCoordinate(), and transformCoordinates().

Referenced by GNEJunction::rebuildGNECrossings().

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

invalidated assignment operator

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

Friends And Related Function Documentation

friend class GNENet
friend

Definition at line 113 of file NBNetBuilder.h.

Field Documentation

NBDistrictCont NBNetBuilder::myDistrictCont
protected

The used container for districts.

Definition at line 221 of file NBNetBuilder.h.

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

NBEdgeCont NBNetBuilder::myEdgeCont
protected

The used container for edges.

Definition at line 215 of file NBNetBuilder.h.

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

bool NBNetBuilder::myHaveLoadedNetworkWithoutInternalEdges
protected

whether a .net.xml without internal edges was loaded

Definition at line 224 of file NBNetBuilder.h.

Referenced by compute(), and haveLoadedNetworkWithoutInternalEdges().

bool NBNetBuilder::myNetworkHaveCrossings
protected

flag to indicate that network has crossings

Definition at line 227 of file NBNetBuilder.h.

Referenced by compute(), and haveNetworkCrossings().

NBNodeCont NBNetBuilder::myNodeCont
protected

The used container for nodes.

Definition at line 209 of file NBNetBuilder.h.

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

NBTrafficLightLogicCont NBNetBuilder::myTLLCont
protected

The used container for traffic light logics.

Definition at line 218 of file NBNetBuilder.h.

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

NBTypeCont NBNetBuilder::myTypeCont
protected

The used container for street types.

Definition at line 212 of file NBNetBuilder.h.

Referenced by applyOptions(), and getTypeCont().


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