91 for (std::map<std::string, EdgeAttrs*>::const_iterator i =
myEdges.begin(); i !=
myEdges.end(); ++i) {
93 for (std::vector<LaneAttrs*>::const_iterator j = ed->
lanes.begin(); j != ed->
lanes.end(); ++j) {
111 for (std::vector<std::string>::const_iterator file = files.begin(); file != files.end(); ++file) {
113 WRITE_ERROR(
"Could not open sumo-net-file '" + *file +
"'.");
122 for (std::map<std::string, EdgeAttrs*>::const_iterator i =
myEdges.begin(); i !=
myEdges.end(); ++i) {
131 if (from ==
nullptr) {
140 WRITE_ERROR(
"Edge's '" + ed->
id +
"' from-node and to-node '" + ed->
toNode +
"' are identical.");
145 if (ed->
shape.size() > 0) {
155 (
int) ed->
lanes.size(),
173 const bool dismissVclasses = oc.
getBool(
"dismiss-vclasses");
174 for (std::map<std::string, EdgeAttrs*>::const_iterator i =
myEdges.begin(); i !=
myEdges.end(); ++i) {
177 if (nbe ==
nullptr) {
181 for (
int fromLaneIndex = 0; fromLaneIndex < (int) ed->
lanes.size(); ++fromLaneIndex) {
184 const std::vector<Connection>& connections = lane->
connections;
186 if (
myEdges.count(c.toEdgeID) == 0) {
187 WRITE_ERROR(
"Unknown edge '" + c.toEdgeID +
"' given in connection.");
191 if (toEdge ==
nullptr) {
198 bool uncontrolled = c.uncontrolled;
206 true, c.mayDefinitelyPass, c.keepClear, c.contPos, c.visibility, c.speed, c.customShape, uncontrolled);
207 if (c.getParametersMap().size() > 0) {
212 const std::map<std::string, NBTrafficLightDefinition*>& programs =
myTLLCont.
getPrograms(c.tlID);
213 if (programs.size() > 0) {
214 std::map<std::string, NBTrafficLightDefinition*>::const_iterator it;
215 for (it = programs.begin(); it != programs.end(); it++) {
218 tlDef->
addConnection(nbe, toEdge, fromLaneIndex, c.toLaneIdx, c.tlLinkIndex,
false);
220 throw ProcessError(
"Corrupt traffic light definition '" + c.tlID +
"' (program '" + it->first +
"')");
224 WRITE_ERROR(
"The traffic light '" + c.tlID +
"' is not known.");
229 if (!dismissVclasses) {
244 bool stopOffsetSet =
false;
249 if (!stopOffsetSet) {
267 toRemove.push_back(nbe);
270 for (EdgeVector::iterator i = toRemove.begin(); i != toRemove.end(); ++i) {
275 NBEdge* prohibitedFrom =
myEdges[it->prohibitedFrom]->builtEdge;
277 NBEdge* prohibitorFrom =
myEdges[it->prohibitorFrom]->builtEdge;
279 if (prohibitedFrom ==
nullptr) {
280 WRITE_WARNING(
"Edge '" + it->prohibitedFrom +
"' in prohibition was not built");
281 }
else if (prohibitedTo ==
nullptr) {
282 WRITE_WARNING(
"Edge '" + it->prohibitedTo +
"' in prohibition was not built");
283 }
else if (prohibitorFrom ==
nullptr) {
284 WRITE_WARNING(
"Edge '" + it->prohibitorFrom +
"' in prohibition was not built");
285 }
else if (prohibitorTo ==
nullptr) {
286 WRITE_WARNING(
"Edge '" + it->prohibitorTo +
"' in prohibition was not built");
295 oc.
set(
"no-internal-links",
"true");
300 if (oc.
isDefault(
"junctions.corner-detail")) {
306 if (oc.
isDefault(
"rectangular-lane-cut")) {
312 if (oc.
isDefault(
"junctions.limit-turn-speed")) {
325 if (!oc.
getBool(
"no-internal-links")) {
329 for (std::vector<Crossing>::const_iterator it_c = (*it).second.begin(); it_c != (*it).second.end(); ++it_c) {
332 for (std::vector<std::string>::const_iterator it_e = crossing.
crossingEdges.begin(); it_e != crossing.
crossingEdges.end(); ++it_e) {
335 if (edge !=
nullptr) {
336 edges.push_back(edge);
339 if (edges.size() > 0) {
348 std::vector<std::string> edgeIDs;
349 if (item.second.fromEdges.size() + item.second.toEdges.size() == 0) {
351 assert(item.second.fromCrossed.size() > 0);
352 assert(item.second.toCrossed.size() > 0);
353 edgeIDs = item.second.fromCrossed;
354 edgeIDs.insert(edgeIDs.end(), item.second.toCrossed.begin(), item.second.toCrossed.end());
355 }
else if (item.second.fromEdges.size() > 0) {
356 edgeIDs = item.second.fromEdges;
358 edgeIDs = item.second.toEdges;
361 for (std::string edgeID : edgeIDs) {
364 if (edge !=
nullptr) {
365 edges.push_back(edge);
368 if (edges.size() > 0) {
376 for (std::vector<std::string>::const_iterator it_r = it->begin(); it_r != it->end(); ++it_r) {
378 if (edge ==
nullptr) {
380 WRITE_ERROR(
"Unknown edge '" + (*it_r) +
"' in roundabout");
383 roundabout.insert(edge);
505 WRITE_ERROR(
"Unmatched closing tag for tl-logic.");
578 WRITE_ERROR(
"Unknown spreadType '" + lsfS +
"' for edge '" +
id +
"'.");
591 WRITE_ERROR(
"Found lane '" +
id +
"' not within edge element.");
595 if (
id != expectedID) {
596 WRITE_WARNING(
"Renaming lane '" +
id +
"' to '" + expectedID +
"'.");
606 assert(crossings.size() > 0);
651 assert(offsets.size() == 1);
655 std::stringstream ss;
656 ss <<
"Duplicate definition of stopOffset for edge " <<
myCurrentEdge->
id <<
".\nIgnoring duplicate specification.";
664 std::stringstream ss;
665 ss <<
"Duplicate definition of lane's stopOffset on edge " <<
myCurrentEdge->
id <<
".\nIgnoring duplicate specifications.";
697 WRITE_WARNING(
"Unknown node type for junction '" +
id +
"'.");
704 WRITE_ERROR(
"Problems on adding junction '" +
id +
"'.");
746 if (
myEdges.count(fromID) == 0) {
747 WRITE_ERROR(
"Unknown edge '" + fromID +
"' given in connection.");
764 if (conn.
tlID !=
"") {
769 if ((
int)from->
lanes.size() <= fromLaneIdx) {
770 WRITE_ERROR(
"Invalid lane index '" +
toString(fromLaneIdx) +
"' for connection from '" + fromID +
"'.");
773 from->
lanes[fromLaneIdx]->connections.push_back(conn);
781 for (std::vector<Crossing>::iterator it = crossings.begin(); it != crossings.end(); ++it) {
782 if (conn.
toEdgeID == (*it).edgeID) {
783 if (conn.
tlID !=
"") {
784 (*it).priority =
true;
795 if (fromID == c.edgeID) {
805 std::map<std::string, WalkingAreaParsedCustomShape>::iterator it =
myWACustomShapes.find(fromID);
809 it->second.toEdges.push_back(conn.
toEdgeID);
813 if (conn.
toEdgeID == crossing.edgeID) {
814 it->second.toCrossed.insert(it->second.toCrossed.end(), crossing.crossingEdges.begin(), crossing.crossingEdges.end());
824 it->second.fromEdges.push_back(fromID);
828 if (fromID == crossing.edgeID) {
829 it->second.fromCrossed.insert(it->second.fromCrossed.end(), crossing.crossingEdges.begin(), crossing.crossingEdges.end());
862 assert(edge->
id == edge_id);
863 if ((
int)edge->
lanes.size() <= index) {
864 WRITE_ERROR(
"Unknown lane '" + lane_id +
"' given in succedge.");
867 return edge->
lanes[index];
875 WRITE_ERROR(
"Definition of tl-logic '" + currentTL->
getID() +
"' was not finished.");
887 WRITE_ERROR(
"Unknown traffic light type '" + typeS +
"' for tlLogic '" +
id +
"'.");
904 const std::string&
id = currentTL->
getID();
919 currentTL->
addPhase(duration, state, minDuration, maxDuration, nextPhases, name);
927 result.push_back(from);
929 if (edge->
lanes[0]->customShape) {
931 result.push_back(to);
938 const int noLanes = (int)edge->
lanes.size();
945 for (
int i = 1; i < (int)firstLane.size() - 1; i++) {
946 const Position& from = firstLane[i - 1];
948 const Position& to = firstLane[i + 1];
959 WRITE_WARNING(
"Could not reconstruct shape for edge '" + edge->
id +
"'.");
963 result.push_back(to);
979 result =
new GeoConvHelper(proj, networkOffset, origBoundary, convBoundary);
998 const std::string::size_type div = attr.find(
"->");
999 if (div == std::string::npos) {
1000 WRITE_ERROR(
"Missing connection divider in prohibition attribute '" + attr +
"'");
1003 from = attr.substr(0, div);
1004 to = attr.substr(div + 2);
1006 if (from.find(
'_') != std::string::npos) {
1007 from = from.substr(0, from.find(
'_'));
1009 if (to.find(
'_') != std::string::npos) {
1010 to = to.substr(0, to.find(
'_'));
1013 if (
myEdges.count(from) == 0) {
1014 WRITE_ERROR(
"Unknown edge prohibition '" + from +
"'");
1018 WRITE_ERROR(
"Unknown edge prohibition '" + to +
"'");
PositionVector customShape
custom shape connection
static const PositionVector EMPTY
empty Vector
std::map< std::string, EdgeAttrs * > myEdges
Loaded edge definitions.
LaneAttrs * myCurrentLane
The currently parsed lanes's definition (to add the shape to)
The information about how to spread the lanes from the given position.
const std::map< std::string, NBTrafficLightDefinition * > & getPrograms(const std::string &id) const
Returns all programs for the given tl-id.
NBNode * retrieve(const std::string &id) const
Returns the node with the given name.
static const bool UNSPECIFIED_CONNECTION_UNCONTROLLED
TLS-controlled despite its node controlled not specified.
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
std::set< std::string > deprecatedVehicleClassesSeen
Whether vehicles must keep the junction clear.
whether a given shape is user-defined
static const double UNSPECIFIED_LOADED_LENGTH
no length override given
bool accelRamp
Whether this lane is an acceleration lane.
static bool transformCoordinate(Position &from, bool includeInBoundary=true, GeoConvHelper *from_srs=0)
transforms loaded coordinates handles projections, offsets (using GeoConvHelper) and import of height...
const std::map< int, double > & getStopOffsets() const
Returns the stopOffset to the end of the edge.
root element of a network file
begin/end of the description of a junction
std::string type
the type of this lane
begin/end of the description of a single lane
bool uncontrolled
if set to true, This connection will not be TLS-controlled despite its node being controlled...
void setRightOfWay(RightOfWay rightOfWay)
set method for computing right-of-way
static bool isReadable(std::string path)
Checks whether the given file is readable.
NBNodeCont & myNodeCont
The node container to fill.
void addEdge(const SUMOSAXAttributes &attrs)
Parses an edge and stores the values in "myCurrentEdge".
static const double UNSPECIFIED_VISIBILITY_DISTANCE
unspecified foe visibility for connections
void setEndOffset(int lane, double offset)
set lane specific end-offset (negative lane implies set for all lanes)
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.
static StringBijection< LaneSpreadFunction > LaneSpreadFunctions
lane spread functions
void setSpeed(int lane, double speed)
set lane specific speed (negative lane implies set for all lanes)
Describes a pedestrian crossing.
connectio between two lanes
Position intersectionPosition2D(const Position &p1, const Position &p2, const double withinDist=0.) const
Returns the position of the intersection.
double maxSpeed
The maximum velocity allowed on this lane.
const double SUMO_const_laneWidth
static std::string getJunctionIDFromInternalEdge(const std::string internalEdge)
return the junction id when given an edge of type internal, crossing or WalkingArea ...
The representation of a single edge during network building.
A connection description.
foe visibility distance of a link
int tlLinkIndex
The index of this connection within the controlling traffic light.
bool myCheckLaneFoesRoundabout
std::vector< std::string > response
static void setLoaded(const GeoConvHelper &loaded)
sets the coordinate transformation loaded from a location element
link,node: the traffic light id responsible for this link
static const double UNSPECIFIED_OFFSET
unspecified lane offset
std::map< SVCPermissions, double > parseStopOffsets(const SUMOSAXAttributes &attrs, bool &ok)
Extract stopOffsets from attributes of stopOffset element.
static const SUMOTime UNSPECIFIED_DURATION
void setPermissions(SVCPermissions permissions, int lane=-1)
set allowed/disallowed classes for the given lane or for all lanes if -1 is given ...
void setLoadedLength(double val)
set loaded lenght
const std::vector< NBEdge::Lane > & getLanes() const
Returns the lane definitions.
double myLimitTurnSpeed
whether turning speed was limited in the network
double width
The width of this lane.
static bool transformCoordinates(PositionVector &from, bool includeInBoundary=true, GeoConvHelper *from_srs=0)
bool myAmLefthand
whether the loaded network was built for lefthand traffic
const double SUMO_const_laneOffset
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static NBLoadedSUMOTLDef * initTrafficLightLogic(const SUMOSAXAttributes &attrs, NBLoadedSUMOTLDef *currentTL)
begins the reading of a traffic lights logic
maximum duration of a phase
const std::string & getID() const
Returns the id.
static StringBijection< LinkState > LinkStates
link states
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
Lane & getLaneStruct(int lane)
void setCustomShape(const PositionVector &shape)
set the junction shape
SAX-handler base for SUMO-files.
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag; Parses edge type information.
NIImporter_SUMO(NBNetBuilder &nb)
Constructor.
bool setStopOffsets(int lane, std::map< int, double > offsets, bool overwrite=false)
set lane and vehicle class specific stopOffset (negative lane implies set for all lanes) ...
bool hasLaneSpecificStopOffsets() const
whether lanes differ in stopOffsets
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list...
Describes custom shape for a walking area during parsing.
static const double UNSPECIFIED_WIDTH
unspecified lane width
virtual SumoXMLEdgeFunc getEdgeFunc(bool &ok) const =0
Returns the value of the named attribute.
A class that stores a 2D geometrical boundary.
prohibition of circulation between two edges
void addPhase(SUMOTime duration, const std::string &state, SUMOTime minDur, SUMOTime maxDur, const std::vector< int > &next, const std::string &name)
Adds a phase to the logic the new phase is inserted at the end of the list of already added phases...
#define WRITE_WARNING(msg)
Describes the values found in a lane's definition.
The connection was computed and validated.
LaneAttrs * getLaneAttrsFromID(EdgeAttrs *edge, std::string lane_id)
Parses lane index from lane ID an retrieve lane from EdgeAttrs.
static OptionsCont & getOptions()
Retrieves the options.
void setLaneShape(int lane, const PositionVector &shape)
sets a custom lane shape
void setAcceleration(int lane, bool accelRamp)
marks one lane as acceleration lane
std::string toEdgeID
The id of the target edge.
virtual std::string getString(int id) const =0
Returns the string-value of the named (by its enum-value) attribute.
bool myHaveSeenInternalEdge
whether the loaded network contains internal lanes
static const double UNSPECIFIED_SPEED
unspecified lane speed
double maxSpeed
The maximum velocity allowed on this edge (!!!)
bool addLane2LaneConnection(int fromLane, NBEdge *dest, int toLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false, bool keepClear=true, double contPos=UNSPECIFIED_CONTPOS, double visibility=UNSPECIFIED_VISIBILITY_DISTANCE, double speed=UNSPECIFIED_SPEED, const PositionVector &customShape=PositionVector::EMPTY, const bool uncontrolled=UNSPECIFIED_CONNECTION_UNCONTROLLED)
Adds a connection between the specified this edge's lane and an approached one.
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".
virtual RightOfWay getRightOfWay(bool &ok) const =0
Returns the right-of-way method.
void setRadius(double radius)
set the turning radius
std::string toNode
The node this edge ends at.
How to compute right of way.
static const int InvalidTlIndex
The turning radius at an intersection in m.
Describes the values found in an edge's definition and this edge's lanes.
void setFileName(const std::string &name)
Sets the current file name.
bool hasLaneSpecificWidth() const
whether lanes differ in width
std::set< NBEdge * > EdgeSet
container for unique edges
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.
bool hasLaneSpecificEndOffset() const
whether lanes differ in offset
static methods for processing the coordinates conversion for the current net
bool insert(NBEdge *edge, bool ignorePrunning=false)
Adds an edge to the dictionary.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
std::vector< std::string > crossingEdges
void updateParameter(const std::map< std::string, std::string > &mapArg)
Adds or updates all given parameters from the map.
std::string allow
This lane's allowed vehicle classes.
bool isUsableFileList(const std::string &name) const
Checks whether the named option is usable as a file list (with at least a single file) ...
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.
static StringBijection< TrafficLightType > TrafficLightTypes
traffic light types
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
std::string getLaneID(int lane) const
get lane ID
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.
parameter associated to a certain key
std::string tlID
The id of the traffic light that controls this connection.
NBEdgeCont & getEdgeCont()
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
void addConnection(NBEdge *from, NBEdge *to, int fromLane, int toLane, int linkIndex, bool reconstruct=true)
Adds a connection and immediately informs the edges.
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
static const double UNSPECIFIED_CONTPOS
unspecified internal junction position
T get(const std::string &str) const
bool hasConnectionTo(NBEdge *destEdge, int destLane, int fromLane=-1) const
Retrieves info about a connection to a certain lane of a certain edge.
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
std::string prohibitedFrom
double distance
The position at the start of this edge (kilometrage/mileage)
const std::string & getID() const
roundabout defined in junction
void setFringeType(FringeType fringeType)
set method for computing right-of-way
std::vector< std::string > getStringVector(const std::string &name) const
Returns the list of string-vector-value of the named option (only for Option_String) ...
double length
The length of the edge if set explicitly.
#define PROGRESS_BEGIN_MESSAGE(msg)
std::string disallow
This lane's disallowed vehicle classes.
edge: the shape in xml-definition
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
double getEndOffset() const
Returns the offset to the destination node.
double speed
custom speed for connection
const std::string & getProgramID() const
Returns the ProgramID.
begin/end of the description of a neighboring lane
NBEdge * builtEdge
The built edge.
virtual SumoXMLNodeType getNodeType(bool &ok) const =0
Returns the value of the named attribute.
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.
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
description of a logic request within the junction
const std::vector< int > getOptIntVector(int attr, const char *objectid, bool &ok, bool report=true) const
convenience function to avoid the default argument and the template stuff at getOpt<> ...
begin/end of the description of an edge
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.
NBNode::Crossing * addCrossing(EdgeVector edges, double width, bool priority, int tlIndex=-1, int tlIndex2=-1, const PositionVector &customShape=PositionVector::EMPTY, bool fromSumoNet=false)
add a pedestrian crossing to this node
std::string type
the type of this lane
bool mayDefinitelyPass
Information about being definitely free to drive (on-ramps)
void addWalkingAreaShape(EdgeVector edges, const PositionVector &shape)
add custom shape for walkingArea
double getLaneWidth() const
Returns the default width of lanes of this edge.
void extrapolate(const double val, const bool onlyFirst=false, const bool onlyLast=false)
extrapolate position vector
virtual double getFloat(int id) const =0
Returns the double-value of the named (by its enum-value) attribute.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
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.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
std::string oppositeID
An opposite lane ID, if given.
the edges crossed by a pedestrian crossing
double contPos
custom position for internal junction on this connection
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
Instance responsible for building networks.
static void interpretLaneID(const std::string &lane_id, std::string &edge_id, int &index)
parses edge-id and index from lane-id
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
int myCornerDetail
the level of corner detail in the loaded network
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
static Position sideOffset(const Position &beg, const Position &end, const double amount)
get a side position of position vector using a offset
SUMOTime getOptSUMOTimeReporting(int attr, const char *objectid, bool &ok, SUMOTime defaultValue, bool report=true) const
Tries to read given attribute assuming it is a SUMOTime.
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)
const std::vector< std::string > getStringVector(int attr) const
Tries to read given attribute assuming it is a string vector.
int priority
This edge's priority.
SumoXMLNodeType getType() const
Returns the type of this node.
void erase(NBDistrictCont &dc, NBEdge *edge)
Removes the given edge from the container (deleting it)
std::string id
This edge's id.
PositionVector customShape
bool insert(const std::string &id, const Position &position, NBDistrict *district=0)
Inserts a node into the map.
void myEndElement(int element)
Called when a closing tag occurs.
This is an uncontrolled, major link, may pass.
std::string fromNode
The node this edge starts at.
void ignore(std::string id)
mark the given edge id as ignored
void declareConnectionsAsLoaded(EdgeBuildingStep step=LANES2LANES_USER)
declares connections as fully loaded. This is needed to avoid recomputing connections if an edge has ...
const Position & getPosition() const
Represents a single node (junction) during network building.
const std::map< std::string, std::string > & getParametersMap() const
Returns the inner key/value map.
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.
bool insert(NBTrafficLightDefinition *logic, bool forceInsert=false)
Adds a logic definition to the dictionary.
PositionVector shape
This lane's shape (needed to reconstruct edge shape for legacy networks)
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
add shorted link FOES
link: the index of the link within the traffic light
NBTrafficLightLogicCont & myTLLCont
The node container to fill.
bool wasIgnored(std::string id) const
Returns whether the edge with the id was ignored during parsing.
#define PROGRESS_DONE_MESSAGE()
std::map< std::string, WalkingAreaParsedCustomShape > myWACustomShapes
Map from walkingArea edge IDs to custom shapes.
void addRoundabout(const EdgeSet &roundabout)
add user specified roundabout
virtual FringeType getFringeType(bool &ok) const =0
returns fringe type
void addProhibition(const SUMOSAXAttributes &attrs)
Parses a prohibition and saves it.
NBDistrictCont & getDistrictCont()
Returns a reference the districts container.
Connection & getConnectionRef(int fromLane, const NBEdge *to, int toLane)
Returns reference to the specified connection This method goes through "myConnections" and returns th...
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)
NBNode * getToNode() const
Returns the destination node of the edge.
int toLaneIdx
The index of the target lane.
a single phase description
static bool isTrafficLight(SumoXMLNodeType type)
return whether the given type is a traffic light
bool intersects(const Position &p1, const Position &p2) const
Returns the information whether this list of points interesects the given line.
std::map< SVCPermissions, double > stopOffsets
This lane's vehicle specific stop offsets.
void setLaneWidth(int lane, double width)
set lane specific width (negative lane implies set for all lanes)
bool ignoreFilterMatch(NBEdge *edge)
Returns true if this edge matches one of the removal criteria.
Information on vClass specific stop offsets at lane end.