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. 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 | |
NBEdgeCont & | getEdgeCont () |
Returns the edge container. More... | |
NBNodeCont & | getNodeCont () |
Returns the node container. More... | |
NBTypeCont & | getTypeCont () |
Returns the type container. More... | |
NBTrafficLightLogicCont & | getTLLogicCont () |
Returns the traffic light logics container. More... | |
NBDistrictCont & | getDistrictCont () |
Returns the districts container. More... | |
const std::vector< EdgeVector > & | getRoundabouts () const |
Returns the determined roundabouts. More... | |
const NBJoinedEdgesMap & | getJoinedEdgesMap () 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< EdgeVector > | myRoundabouts |
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... | |
NBNetBuilder & | operator= (const NBNetBuilder &s) |
invalidated assignment operator More... | |
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 113 of file NBNetBuilder.h.
NBNetBuilder::NBNetBuilder | ( | ) |
Constructor.
Definition at line 68 of file NBNetBuilder.cpp.
NBNetBuilder::~NBNetBuilder | ( | ) |
Destructor.
Definition at line 74 of file NBNetBuilder.cpp.
|
private |
invalidated copy constructor
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 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.
[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] | removeElements | whether processing steps which cause nodes and edges to be removed shall be triggered |
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().
|
inline |
Returns the districts container.
Definition at line 186 of file NBNetBuilder.h.
References myDistrictCont.
Referenced by NIImporter_VISUM::buildDistrictNode(), NBRampsComputer::computeRamps(), NILoader::load(), NILoader::loadXML(), NIImporter_VISUM::parse_Connectors(), NIImporter_VISUM::parse_Districts(), NIImporter_VISUM::parse_Lanes(), NIImporter_Vissim::postLoadBuild(), and NWWriter_SUMO::writeNetwork().
|
inline |
Returns the edge container.
Definition at line 154 of file NBNetBuilder.h.
References myEdgeCont.
Referenced by NIImporter_SUMO::_loadNetwork(), NBRampsComputer::computeRamps(), NIImporter_VISUM::getNamedEdge(), NIImporter_VISUM::getNamedEdgeContinuating(), NIImporter_VISUM::getReversedContinuating(), NIImporter_OpenStreetMap::insertEdge(), NILoader::load(), NIImporter_RobocupRescue::loadNetwork(), NIImporter_ArcView::loadNetwork(), NIImporter_DlrNavteq::loadNetwork(), NIImporter_MATSim::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), NILoader::loadXML(), main(), NIImporter_VISUM::parse_Connectors(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIImporter_Vissim::postLoadBuild(), NGNet::toNB(), NWWriter_Amitran::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_DlrNavteq::writeNetwork(), NWWriter_XML::writeNetwork(), and NWWriter_SUMO::writeNetwork().
|
inline |
Returns the joined edges map.
Definition at line 202 of file NBNetBuilder.h.
References myJoinedEdges.
Referenced by NWFrame::writeNetwork().
|
inline |
Returns the node container.
Definition at line 162 of file NBNetBuilder.h.
References myNodeCont.
Referenced by NIImporter_VISUM::buildDistrictNode(), NGEdge::buildNBEdge(), NBRampsComputer::computeRamps(), NIImporter_VISUM::getNamedNode(), NIImporter_OpenStreetMap::insertEdge(), NILoader::load(), NIImporter_OpenStreetMap::load(), NIImporter_RobocupRescue::loadNetwork(), 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(), NGNet::toNB(), NWWriter_Amitran::writeNetwork(), NWWriter_OpenDrive::writeNetwork(), NWWriter_MATSim::writeNetwork(), NWWriter_DlrNavteq::writeNetwork(), NWWriter_XML::writeNetwork(), and NWWriter_SUMO::writeNetwork().
|
inline |
Returns the determined roundabouts.
Definition at line 194 of file NBNetBuilder.h.
References myRoundabouts.
Referenced by NWWriter_Amitran::writeNetwork(), and NWWriter_SUMO::writeNetwork().
|
inline |
Returns the traffic light logics container.
Definition at line 178 of file NBNetBuilder.h.
References myTLLCont.
Referenced by NGNode::buildNBNode(), NIImporter_OpenStreetMap::insertEdge(), NILoader::load(), NIImporter_VISUM::load(), NIImporter_OpenStreetMap::load(), NIImporter_DlrNavteq::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), NILoader::loadXML(), NIImporter_Vissim::postLoadBuild(), NWWriter_XML::writeNetwork(), and NWWriter_SUMO::writeNetwork().
|
inline |
Returns the type container.
Definition at line 170 of file NBNetBuilder.h.
References myTypeCont.
Referenced by NGEdge::buildNBEdge(), NIImporter_OpenStreetMap::insertEdge(), NILoader::load(), NIImporter_OpenStreetMap::load(), NIImporter_ArcView::loadNetwork(), NIImporter_OpenDrive::loadNetwork(), NILoader::loadXML(), NIImporter_VISUM::parse_Edges(), NIImporter_VISUM::parse_Types(), and NGNet::toNB().
|
inline |
declare that roundabouts have been seen during loading
Definition at line 209 of file NBNetBuilder.h.
References myHaveSeenRoundabouts.
Referenced by NIImporter_SUMO::myStartElement().
|
private |
shift network so its lower left corner is at 0,0
Definition at line 420 of file NBNetBuilder.cpp.
References NBDistrictCont::begin(), NBNodeCont::begin(), NBEdgeCont::begin(), NBDistrictCont::end(), NBNodeCont::end(), NBEdgeCont::end(), GeoConvHelper::getConvBoundary(), GeoConvHelper::moveConvertedBy(), myDistrictCont, myEdgeCont, myNodeCont, PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, SUMOReal, Boundary::xmin(), and Boundary::ymin().
Referenced by compute().
|
private |
invalidated assignment operator
|
static |
transforms loaded coordinates handles projections, offsets (using GeoConvHelper) and import of height data (using Heightmapper if available)
[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 These methods are located outside of GeoConvHelper to avoid linker-dependecies on INTERNAL_LIBS and GDAL for libgeom |
Definition at line 440 of file NBNetBuilder.cpp.
References GeoConvHelper::cartesian2geo(), GeoConvHelper::getProcessing(), SUMOReal, UNUSED_PARAMETER, GeoConvHelper::usingGeoProjection(), Position::x(), GeoConvHelper::x2cartesian(), and Position::y().
Referenced by NIImporter_SUMO::addEdge(), NIImporter_SUMO::addJunction(), NIImporter_SUMO::addLane(), NIXMLNodesHandler::addNode(), NIImporter_OpenDrive::computeShapes(), NBEdgeCont::ignoreFilterMatch(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::insertNodeChecking(), NIImporter_ArcView::load(), NIImporter_RobocupRescue::loadNodes(), NIImporter_ITSUMO::Handler::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(), transformCoordinates(), and NIXMLEdgesHandler::tryGetShape().
|
static |
Definition at line 462 of file NBNetBuilder.cpp.
References OptionsCont::getFloat(), OptionsCont::getOptions(), PositionVector::insertAt(), SUMOReal, and transformCoordinates().
|
friend |
Definition at line 114 of file NBNetBuilder.h.
|
protected |
The used container for districts.
Definition at line 255 of file NBNetBuilder.h.
Referenced by compute(), getDistrictCont(), and moveToOrigin().
|
protected |
The used container for edges.
Definition at line 249 of file NBNetBuilder.h.
Referenced by applyOptions(), compute(), getEdgeCont(), and moveToOrigin().
|
protected |
whether a sumo network with roundabout information was loaded
Definition at line 258 of file NBNetBuilder.h.
Referenced by compute(), and haveSeenRoundabouts().
|
protected |
Map of joined edges.
Definition at line 264 of file NBNetBuilder.h.
Referenced by compute(), and getJoinedEdgesMap().
|
protected |
The used container for nodes.
Definition at line 243 of file NBNetBuilder.h.
Referenced by compute(), getNodeCont(), and moveToOrigin().
|
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().
|
protected |
The used container for traffic light logics.
Definition at line 252 of file NBNetBuilder.h.
Referenced by applyOptions(), compute(), and getTLLogicCont().
|
protected |
The used container for street types.
Definition at line 246 of file NBNetBuilder.h.
Referenced by applyOptions(), and getTypeCont().