SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NBNetBuilder Class Reference

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. More...
 
void compute (OptionsCont &oc, const std::set< std::string > &explicitTurnarounds=std::set< std::string >(), bool removeElements=true)
 Performs the network building steps. More...
 
void haveSeenRoundabouts ()
 declare that roundabouts have been seen during loading More...
 
 NBNetBuilder ()
 Constructor. More...
 
 ~NBNetBuilder ()
 Destructor. More...
 
Retrieval of subcontainers
NBEdgeContgetEdgeCont ()
 Returns the edge container. More...
 
NBNodeContgetNodeCont ()
 Returns the node container. More...
 
NBTypeContgetTypeCont ()
 Returns the type container. More...
 
NBTrafficLightLogicContgetTLLogicCont ()
 Returns the traffic light logics container. More...
 
NBDistrictContgetDistrictCont ()
 Returns the districts container. More...
 
const std::vector< EdgeVector > & getRoundabouts () const
 Returns the determined roundabouts. More...
 
const NBJoinedEdgesMapgetJoinedEdgesMap () const
 Returns the joined edges map. More...
 

Static Public Member Functions

static bool transformCoordinates (Position &from, bool includeInBoundary=true, GeoConvHelper *from_srs=0)
 transforms loaded coordinates handles projections, offsets (using GeoConvHelper) and import of height data (using Heightmapper if available) 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 myHaveSeenRoundabouts
 whether a sumo network with roundabout information was loaded More...
 
NBJoinedEdgesMap myJoinedEdges
 Map of joined edges. More...
 
NBNodeCont myNodeCont
 The used container for nodes. More...
 
std::vector< EdgeVectormyRoundabouts
 Edges marked as belonging to a roundabout (each EdgeVector is a roundabout) More...
 
NBTrafficLightLogicCont myTLLCont
 The used container for traffic light logics. More...
 
NBTypeCont myTypeCont
 The used container for street types. More...
 

Private Member Functions

void moveToOrigin (GeoConvHelper &geoConvHelper)
 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 113 of file NBNetBuilder.h.

Constructor & Destructor Documentation

NBNetBuilder::NBNetBuilder ( )

Constructor.

Definition at line 68 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(), OptionsCont::isSet(), myEdgeCont, myTLLCont, myTypeCont, OptionsCont::set(), and NBTypeCont::setDefaults().

Referenced by main().

void NBNetBuilder::compute ( OptionsCont oc,
const std::set< std::string > &  explicitTurnarounds = std::set<std::string>(),
bool  removeElements = 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]removeElementswhether processing steps which cause nodes and edges to be removed shall be triggered
Exceptions
ProcessError(recheck)

Definition at line 108 of file NBNetBuilder.cpp.

References Boundary::add(), NBNodeCont::addJoinExclusion(), NBEdgeCont::appendTurnarounds(), NBNodeCont::begin(), NBEdgeCont::begin(), NBEdgeCont::checkGeometries(), 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(), NBNodeCont::end(), NBEdgeCont::end(), OptionsCont::exists(), NBEdgeCont::generateStreetSigns(), StringBijection< T >::get(), OptionsCont::getBool(), GeoConvHelper::getConvBoundary(), OptionsCont::getFloat(), GeoConvHelper::getOffsetBase(), GeoConvHelper::getOrigBoundary(), GeoConvHelper::getProcessing(), OptionsCont::getString(), OptionsCont::getStringVector(), NBEdgeCont::guessRoundabouts(), NBEdgeCont::guessSidewalks(), NBNodeCont::guessTLs(), NBJoinedEdgesMap::init(), OptionsCont::isDefault(), OptionsCont::isSet(), NBNodeCont::joinJunctions(), NBNodeCont::joinLoadedClusters(), NBNodeCont::joinSimilarEdges(), NBNodeCont::joinTLS(), MAX2(), MIN2(), moveToOrigin(), myDistrictCont, myEdgeCont, myHaveSeenRoundabouts, myJoinedEdges, myNodeCont, myRoundabouts, myTLLCont, NBNodeCont::printBuiltNodesStatistics(), PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, NBEdgeCont::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NBEdgeCont::reduceGeometries(), NBNodeCont::removeIsolatedRoads(), NBNodeCont::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBRequest::reportWarnings(), NBNodeCont::retrieve(), 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 main().

const NBJoinedEdgesMap& NBNetBuilder::getJoinedEdgesMap ( ) const
inline

Returns the joined edges map.

Returns
The map of joined edges

Definition at line 202 of file NBNetBuilder.h.

References myJoinedEdges.

Referenced by NWFrame::writeNetwork().

const std::vector<EdgeVector>& NBNetBuilder::getRoundabouts ( ) const
inline

Returns the determined roundabouts.

Returns
The list of roundabout edges

Definition at line 194 of file NBNetBuilder.h.

References myRoundabouts.

Referenced by NWWriter_Amitran::writeNetwork(), and NWWriter_SUMO::writeNetwork().

void NBNetBuilder::haveSeenRoundabouts ( )
inline

declare that roundabouts have been seen during loading

Definition at line 209 of file NBNetBuilder.h.

References myHaveSeenRoundabouts.

Referenced by NIImporter_SUMO::myStartElement().

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

invalidated assignment operator

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

Friends And Related Function Documentation

friend class GNENet
friend

Definition at line 114 of file NBNetBuilder.h.

Field Documentation

NBDistrictCont NBNetBuilder::myDistrictCont
protected

The used container for districts.

Definition at line 255 of file NBNetBuilder.h.

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

NBEdgeCont NBNetBuilder::myEdgeCont
protected

The used container for edges.

Definition at line 249 of file NBNetBuilder.h.

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

bool NBNetBuilder::myHaveSeenRoundabouts
protected

whether a sumo network with roundabout information was loaded

Definition at line 258 of file NBNetBuilder.h.

Referenced by compute(), and haveSeenRoundabouts().

NBJoinedEdgesMap NBNetBuilder::myJoinedEdges
protected

Map of joined edges.

Definition at line 264 of file NBNetBuilder.h.

Referenced by compute(), and getJoinedEdgesMap().

NBNodeCont NBNetBuilder::myNodeCont
protected

The used container for nodes.

Definition at line 243 of file NBNetBuilder.h.

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

std::vector<EdgeVector> NBNetBuilder::myRoundabouts
protected

Edges marked as belonging to a roundabout (each EdgeVector is a roundabout)

Definition at line 261 of file NBNetBuilder.h.

Referenced by compute(), and getRoundabouts().

NBTrafficLightLogicCont NBNetBuilder::myTLLCont
protected

The used container for traffic light logics.

Definition at line 252 of file NBNetBuilder.h.

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

NBTypeCont NBNetBuilder::myTypeCont
protected

The used container for street types.

Definition at line 246 of file NBNetBuilder.h.

Referenced by applyOptions(), and getTypeCont().


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