19 #ifndef NIImporter_SUMO_h 20 #define NIImporter_SUMO_h 286 edgeID(_edgeID), customTLIndex(-1), customTLIndex2(-1) {}
PositionVector customShape
custom shape connection
std::map< std::string, EdgeAttrs * > myEdges
Loaded edge definitions.
LaneAttrs * myCurrentLane
The currently parsed lanes's definition (to add the shape to)
PositionVector shape
This edges's shape.
std::vector< Prohibition > myProhibitions
Loaded prohibitions.
static void addPhase(const SUMOSAXAttributes &attrs, NBLoadedSUMOTLDef *currentTL)
adds a phase to the traffic lights logic currently build
bool accelRamp
Whether this lane is an acceleration lane.
bool uncontrolled
if set to true, This connection will not be TLS-controlled despite its node being controlled...
std::vector< std::string > toEdges
NBNodeCont & myNodeCont
The node container to fill.
void addEdge(const SUMOSAXAttributes &attrs)
Parses an edge and stores the values in "myCurrentEdge".
void addRoundabout(const SUMOSAXAttributes &attrs)
Parses a roundabout and stores it in myEdgeCont.
A loaded (complete) traffic light logic.
std::vector< LaneAttrs * > lanes
This edge's lanes.
A container for traffic light definitions and built programs.
Describes a pedestrian crossing.
double maxSpeed
The maximum velocity allowed on this lane.
The representation of a single edge during network building.
A connection description.
std::vector< std::string > toCrossed
int tlLinkIndex
The index of this connection within the controlling traffic light.
bool myCheckLaneFoesRoundabout
std::vector< std::string > response
std::vector< std::string > fromEdges
double myLimitTurnSpeed
whether turning speed was limited in the network
double width
The width of this lane.
bool myAmLefthand
whether the loaded network was built for lefthand traffic
static NBLoadedSUMOTLDef * initTrafficLightLogic(const SUMOSAXAttributes &attrs, NBLoadedSUMOTLDef *currentTL)
begins the reading of a traffic lights logic
std::vector< std::string > fromCrossed
SAX-handler base for SUMO-files.
NIImporter_SUMO(NBNetBuilder &nb)
Constructor.
Describes custom shape for a walking area during parsing.
Describes the values found in a lane's definition.
LaneAttrs * getLaneAttrsFromID(EdgeAttrs *edge, std::string lane_id)
Parses lane index from lane ID an retrieve lane from EdgeAttrs.
std::string toEdgeID
The id of the target edge.
bool myHaveSeenInternalEdge
whether the loaded network contains internal lanes
double maxSpeed
The maximum velocity allowed on this edge (!!!)
void addStopOffsets(const SUMOSAXAttributes &attrs, bool &ok)
parses stop offsets for the current lane or edge
void addLane(const SUMOSAXAttributes &attrs)
Parses a lane and stores the values in "myCurrentLane".
NBNetBuilder & myNetBuilder
The network builder to fill.
std::vector< std::vector< std::string > > myRoundabouts
loaded roundabout edges
void addConnection(const SUMOSAXAttributes &attrs)
Parses a connection and saves it into the lane's definition stored in "myCurrentLane".
std::string toNode
The node this edge ends at.
Describes the values found in an edge's definition and this edge's lanes.
int myLinkDetail
the level of geometry detail for internal lanes in the loaded network
JunctionAttrs myCurrentJunction
The currently parsed junction definition to help in reconstructing crossings.
static methods for processing the coordinates conversion for the current net
std::vector< std::string > crossingEdges
std::string allow
This lane's allowed vehicle classes.
Describes the values found in a junction.
std::vector< Parameterised * > myLastParameterised
element to receive parameters
Encapsulated SAX-Attributes.
static GeoConvHelper * loadLocation(const SUMOSAXAttributes &attrs)
Parses network location description and registers it with GeoConveHelper::setLoaded.
Describes the values found in a prohibition.
A point in 2D or 3D with translation and scaling methods.
Importer for networks stored in SUMO format.
std::string tlID
The id of the traffic light that controls this connection.
EdgeAttrs * myCurrentEdge
The currently parsed edge's definition (to add loaded lanes to)
void parseProhibitionConnection(const std::string &attr, std::string &from, std::string &to, bool &ok)
parses connection string of a prohibition (very old school)
bool myRectLaneCut
whether all lanes of an edge should have the same stop line
double visibility
custom foe visibility for connection
LaneSpreadFunction lsf
The lane spread function.
bool customShape
Whether this lane has a custom shape.
std::string prohibitorFrom
std::string prohibitedFrom
double distance
The position at the start of this edge (kilometrage/mileage)
double length
The length of the edge if set explicitly.
std::string disallow
This lane's disallowed vehicle classes.
double speed
custom speed for connection
NBEdge * builtEdge
The built edge.
static PositionVector reconstructEdgeShape(const EdgeAttrs *edge, const Position &from, const Position &to)
reconstructs the edge shape from the node positions and the given lane shapes since we do not know th...
SumoXMLEdgeFunc func
This edge's function.
An upper class for objects with additional parameters.
std::map< SVCPermissions, double > stopOffsets
This edge's vehicle specific stop offsets (used for lanes, that do not have a specified stopOffset) ...
std::string oppositeID
This lane's opposite lane.
void _loadNetwork(OptionsCont &oc)
load the network
Crossing(const std::string &_edgeID)
bool keepClear
Whether the junction must be kept clear coming from this connection.
NIXMLTypesHandler myTypesHandler
The handler for parsing edge types and restrictions.
std::vector< std::string > intLanes
double endOffset
This lane's offset from the intersection.
std::string streetName
This edge's street name.
static void loadNetwork(OptionsCont &oc, NBNetBuilder &nb)
Loads content of the optionally given SUMO file.
std::string type
the type of this lane
bool mayDefinitelyPass
Information about being definitely free to drive (on-ramps)
Importer for edge type information stored in XML.
double myNetworkVersion
the loaded network version
std::vector< Connection > connections
This lane's connections.
void addJunction(const SUMOSAXAttributes &attrs)
Parses a junction and saves it in the node control.
bool myCheckLaneFoesAll
whether foe-relationships where checked at lane-level
std::string type
This edge's type.
double contPos
custom position for internal junction on this connection
Instance responsible for building networks.
int myCornerDetail
the level of corner detail in the loaded network
static Position readPosition(const SUMOSAXAttributes &attrs, const std::string &id, bool &ok)
read position from the given attributes, attribute errors to id
std::map< std::string, std::vector< Crossing > > myPedestrianCrossings
The pedestrian crossings found in the network.
A storage for options typed value containers)
int priority
This edge's priority.
std::string id
This edge's id.
PositionVector customShape
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
void myEndElement(int element)
Called when a closing tag occurs.
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge's lateral offset shal...
std::string fromNode
The node this edge starts at.
Represents a single node (junction) during network building.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
~NIImporter_SUMO()
Destructor.
void addRequest(const SUMOSAXAttributes &attrs)
Parses a reques and saves selected attributes in myCurrentJunction.
GeoConvHelper * myLocation
The coordinate transformation which was used to build the loaded network.
PositionVector shape
This lane's shape (needed to reconstruct edge shape for legacy networks)
NBTrafficLightLogicCont & myTLLCont
The node container to fill.
Container for nodes during the netbuilding process.
std::map< std::string, WalkingAreaParsedCustomShape > myWACustomShapes
Map from walkingArea edge IDs to custom shapes.
void addProhibition(const SUMOSAXAttributes &attrs)
Parses a prohibition and saves it.
NBLoadedSUMOTLDef * myCurrentTL
The currently parsed traffic light.
bool myWalkingAreas
whether walkingareas must be built
std::set< std::string > myRailSignals
list of node id with rail signals (no NBTrafficLightDefinition exists)
int toLaneIdx
The index of the target lane.
std::map< SVCPermissions, double > stopOffsets
This lane's vehicle specific stop offsets.