Eclipse SUMO - Simulation of Urban MObility
NIXMLEdgesHandler.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
19 // Importer for network edges stored in XML
20 /****************************************************************************/
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <string>
29 #include <iostream>
30 #include <map>
31 #include <cmath>
32 #include <xercesc/sax/HandlerBase.hpp>
33 #include <xercesc/sax/AttributeList.hpp>
34 #include <xercesc/sax/SAXParseException.hpp>
35 #include <xercesc/sax/SAXException.hpp>
37 #include <netbuild/NBNodeCont.h>
38 #include <netbuild/NBTypeCont.h>
39 #include <netbuild/NBNetBuilder.h>
45 #include <utils/common/ToString.h>
48 #include "NIXMLNodesHandler.h"
49 #include "NIXMLEdgesHandler.h"
50 
51 
52 // ===========================================================================
53 // method definitions
54 // ===========================================================================
56  NBEdgeCont& ec,
57  NBTypeCont& tc,
58  NBDistrictCont& dc,
60  OptionsCont& options) :
61  SUMOSAXHandler("xml-edges - file"),
62  myOptions(options),
63  myNodeCont(nc),
64  myEdgeCont(ec),
65  myTypeCont(tc),
66  myDistrictCont(dc),
67  myTLLogicCont(tlc),
68  myCurrentEdge(nullptr),
69  myCurrentLaneIndex(-1),
70  myHaveReportedAboutOverwriting(false),
71  myHaveReportedAboutTypeOverride(false),
72  myHaveWarnedAboutDeprecatedLaneId(false),
73  myKeepEdgeShape(!options.getBool("plain.extend-edge-shape")) {
74 }
75 
76 
78 
79 
80 void
82  const SUMOSAXAttributes& attrs) {
83  switch (element) {
84  case SUMO_TAG_EDGE:
85  addEdge(attrs);
86  break;
87  case SUMO_TAG_LANE:
88  addLane(attrs);
89  break;
90  case SUMO_TAG_NEIGH:
92  break;
93  case SUMO_TAG_SPLIT:
94  addSplit(attrs);
95  break;
96  case SUMO_TAG_DELETE:
97  deleteEdge(attrs);
98  break;
100  addRoundabout(attrs);
101  break;
102  case SUMO_TAG_PARAM:
103  if (myLastParameterised.size() != 0 && myCurrentEdge != nullptr) {
104  bool ok = true;
105  const std::string key = attrs.get<std::string>(SUMO_ATTR_KEY, nullptr, ok);
106  // circumventing empty string test
107  const std::string val = attrs.hasAttribute(SUMO_ATTR_VALUE) ? attrs.getString(SUMO_ATTR_VALUE) : "";
108  myLastParameterised.back()->setParameter(key, val);
109  }
110  break;
111  case SUMO_TAG_STOPOFFSET: {
112  bool ok = true;
113  std::map<SVCPermissions, double> stopOffsets = parseStopOffsets(attrs, ok);
114  assert(stopOffsets.size() == 1);
115  if (!ok) {
116  std::stringstream ss;
117  ss << "(Error encountered at lane " << myCurrentLaneIndex << " of edge '" << myCurrentID << "' while parsing stopOffsets.)";
118  WRITE_ERROR(ss.str());
119  } else {
120  if (myCurrentEdge->getStopOffsets(myCurrentLaneIndex).size() != 0) {
121  std::stringstream ss;
122  ss << "Duplicate definition of stopOffset for ";
123  if (myCurrentLaneIndex != -1) {
124  ss << "lane " << myCurrentLaneIndex << " on ";
125  }
126  ss << "edge " << myCurrentEdge->getID() << ". Ignoring duplicate specification.";
127  WRITE_WARNING(ss.str());
128  return;
129  } else if (stopOffsets.begin()->second > myCurrentEdge->getLength() || stopOffsets.begin()->second < 0) {
130  std::stringstream ss;
131  ss << "Ignoring invalid stopOffset for ";
132  if (myCurrentLaneIndex != -1) {
133  ss << "lane " << myCurrentLaneIndex << " on ";
134  }
135  ss << "edge " << myCurrentEdge->getID();
136  if (stopOffsets.begin()->second > myCurrentEdge->getLength()) {
137  ss << " (offset larger than the edge length).";
138  } else {
139  ss << " (negative offset).";
140  }
141  WRITE_WARNING(ss.str());
142  } else {
144  }
145  }
146  }
147  break;
148  default:
149  break;
150  }
151 }
152 
153 
154 void
156  myIsUpdate = false;
157  bool ok = true;
158  // initialise the edge
159  myCurrentEdge = nullptr;
160  mySplits.clear();
161  // get the id, report an error if not given or empty...
162  myCurrentID = attrs.get<std::string>(SUMO_ATTR_ID, nullptr, ok);
163  if (!ok) {
164  return;
165  }
167  // check deprecated (unused) attributes
168  // use default values, first
169  myCurrentType = myOptions.getString("default.type");
173  if (myCurrentEdge != nullptr) {
174  // update existing edge. only update lane-specific settings when explicitly requested
175  myIsUpdate = true;
180  } else {
181  // this is a completely new edge. get the type specific defaults
185  }
189  myCurrentStreetName = "";
190  myReinitKeepEdgeShape = false;
193  // check whether a type's values shall be used
194  if (attrs.hasAttribute(SUMO_ATTR_TYPE)) {
195  myCurrentType = attrs.get<std::string>(SUMO_ATTR_TYPE, myCurrentID.c_str(), ok);
196  if (!ok) {
197  return;
198  }
199  if (!myTypeCont.knows(myCurrentType) && !myOptions.getBool("ignore-errors.edge-type")) {
200  WRITE_ERROR("Type '" + myCurrentType + "' used by edge '" + myCurrentID + "' was not defined (ignore with option --ignore-errors.edge-type).");
201  return;
202  }
210  }
211  // use values from the edge to overwrite if existing, then
212  if (myIsUpdate) {
214  WRITE_MESSAGE("Duplicate edge id occurred ('" + myCurrentID + "'); assuming overwriting is wished.");
216  }
219  WRITE_MESSAGE("Edge '" + myCurrentID + "' changed it's type; assuming type override is wished.");
221  }
222  }
223  if (attrs.getOpt<bool>(SUMO_ATTR_REMOVE, myCurrentID.c_str(), ok, false)) {
225  myCurrentEdge = nullptr;
226  return;
227  }
232  myReinitKeepEdgeShape = true;
233  }
237  }
239  }
240  // speed, priority and the number of lanes have now default values;
241  // try to read the real values from the file
242  if (attrs.hasAttribute(SUMO_ATTR_SPEED)) {
243  myCurrentSpeed = attrs.get<double>(SUMO_ATTR_SPEED, myCurrentID.c_str(), ok);
244  }
245  if (myOptions.getBool("speed-in-kmh") && myCurrentSpeed != NBEdge::UNSPECIFIED_SPEED) {
246  myCurrentSpeed = myCurrentSpeed / (double) 3.6;
247  }
248  // try to get the number of lanes
249  if (attrs.hasAttribute(SUMO_ATTR_NUMLANES)) {
250  myCurrentLaneNo = attrs.get<int>(SUMO_ATTR_NUMLANES, myCurrentID.c_str(), ok);
251  }
252  // try to get the priority
253  if (attrs.hasAttribute(SUMO_ATTR_PRIORITY)) {
254  myCurrentPriority = attrs.get<int>(SUMO_ATTR_PRIORITY, myCurrentID.c_str(), ok);
255  }
256  // try to get the width
257  if (attrs.hasAttribute(SUMO_ATTR_WIDTH)) {
258  myCurrentWidth = attrs.get<double>(SUMO_ATTR_WIDTH, myCurrentID.c_str(), ok);
259  }
260  // try to get the offset of the stop line from the intersection
261  if (attrs.hasAttribute(SUMO_ATTR_ENDOFFSET)) {
262  myCurrentEndOffset = attrs.get<double>(SUMO_ATTR_ENDOFFSET, myCurrentID.c_str(), ok);
263  }
264  // try to get the street name
265  if (attrs.hasAttribute(SUMO_ATTR_NAME)) {
266  myCurrentStreetName = attrs.get<std::string>(SUMO_ATTR_NAME, myCurrentID.c_str(), ok);
267  if (myCurrentStreetName != "" && myOptions.isDefault("output.street-names")) {
268  myOptions.set("output.street-names", "true");
269  }
270  }
271 
272  // try to get the allowed/disallowed classes
274  std::string allowS = attrs.hasAttribute(SUMO_ATTR_ALLOW) ? attrs.getStringSecure(SUMO_ATTR_ALLOW, "") : "";
275  std::string disallowS = attrs.hasAttribute(SUMO_ATTR_DISALLOW) ? attrs.getStringSecure(SUMO_ATTR_DISALLOW, "") : "";
276  // XXX matter of interpretation: should updated permissions replace or extend previously set permissions?
277  myPermissions = parseVehicleClasses(allowS, disallowS);
278  }
279  // try to set the nodes
280  if (!setNodes(attrs)) {
281  // return if this failed
282  return;
283  }
284  // try to get the shape
285  myShape = tryGetShape(attrs);
286  // try to get the spread type
288  // try to get the length
289  myLength = attrs.getOpt<double>(SUMO_ATTR_LENGTH, myCurrentID.c_str(), ok, myLength);
290  // try to get the sidewalkWidth
292  // try to get the bikeLaneWidth
294  // insert the parsed edge into the edges map
295  if (!ok) {
296  return;
297  }
298  // check whether a previously defined edge shall be overwritten
299  if (myCurrentEdge != nullptr) {
305  } else {
306  // the edge must be allocated in dependence to whether a shape is given
307  if (myShape.size() == 0) {
311  } else {
316  }
317  }
321  }
322  // try to get the kilometrage/mileage
324 
326 }
327 
328 
329 void
331  if (myCurrentEdge == nullptr) {
332  if (!OptionsCont::getOptions().isInStringVector("remove-edges.explicit", myCurrentID)) {
333  WRITE_ERROR("Additional lane information could not be set - the edge with id '" + myCurrentID + "' is not known.");
334  }
335  return;
336  }
337  bool ok = true;
338  int lane;
339  if (attrs.hasAttribute(SUMO_ATTR_ID)) {
340  lane = attrs.get<int>(SUMO_ATTR_ID, myCurrentID.c_str(), ok);
343  WRITE_WARNING("'" + toString(SUMO_ATTR_ID) + "' is deprecated, please use '" + toString(SUMO_ATTR_INDEX) + "' instead.");
344  }
345  } else {
346  lane = attrs.get<int>(SUMO_ATTR_INDEX, myCurrentID.c_str(), ok);
347  }
348  if (!ok) {
349  return;
350  }
351  // check whether this lane exists
352  if (lane >= myCurrentEdge->getNumLanes()) {
353  WRITE_ERROR("Lane index is larger than number of lanes (edge '" + myCurrentID + "').");
354  return;
355  }
356  myCurrentLaneIndex = lane;
357  // set information about allowed / disallowed vehicle classes (if specified)
359  const std::string allowed = attrs.getOpt<std::string>(SUMO_ATTR_ALLOW, nullptr, ok, "");
360  const std::string disallowed = attrs.getOpt<std::string>(SUMO_ATTR_DISALLOW, nullptr, ok, "");
361  myCurrentEdge->setPermissions(parseVehicleClasses(allowed, disallowed), lane);
362  }
363  if (attrs.hasAttribute(SUMO_ATTR_PREFER)) {
364  const std::string preferred = attrs.get<std::string>(SUMO_ATTR_PREFER, nullptr, ok);
366  }
367  // try to get the width
368  if (attrs.hasAttribute(SUMO_ATTR_WIDTH)) {
369  myCurrentEdge->setLaneWidth(lane, attrs.get<double>(SUMO_ATTR_WIDTH, myCurrentID.c_str(), ok));
370  }
371  // try to get the end-offset (lane shortened due to pedestrian crossing etc..)
372  if (attrs.hasAttribute(SUMO_ATTR_ENDOFFSET)) {
373  myCurrentEdge->setEndOffset(lane, attrs.get<double>(SUMO_ATTR_ENDOFFSET, myCurrentID.c_str(), ok));
374  }
375  // try to get lane specific speed (should not occur for german networks)
376  if (attrs.hasAttribute(SUMO_ATTR_SPEED)) {
377  myCurrentEdge->setSpeed(lane, attrs.get<double>(SUMO_ATTR_SPEED, myCurrentID.c_str(), ok));
378  }
379  // check whether this is an acceleration lane
381  myCurrentEdge->setAcceleration(lane, attrs.get<bool>(SUMO_ATTR_ACCELERATION, myCurrentID.c_str(), ok));
382  }
383  // check whether this lane has a custom shape
384  if (attrs.hasAttribute(SUMO_ATTR_SHAPE)) {
385  PositionVector shape = attrs.get<PositionVector>(SUMO_ATTR_SHAPE, myCurrentID.c_str(), ok);
387  const std::string laneID = myCurrentID + "_" + toString(lane);
388  WRITE_ERROR("Unable to project coordinates for lane '" + laneID + "'.");
389  }
390  myCurrentEdge->setLaneShape(lane, shape);
391  }
392  // set custom lane type
393  if (attrs.hasAttribute(SUMO_ATTR_TYPE)) {
394  myCurrentEdge->setLaneType(lane, attrs.get<std::string>(SUMO_ATTR_TYPE, myCurrentID.c_str(), ok));
395  }
397 }
398 
399 
401  if (myCurrentEdge == nullptr) {
402  if (!OptionsCont::getOptions().isInStringVector("remove-edges.explicit", myCurrentID)) {
403  WRITE_WARNING("Ignoring 'split' because it cannot be assigned to an edge");
404  }
405  return;
406  }
407  bool ok = true;
409  e.pos = attrs.get<double>(SUMO_ATTR_POSITION, nullptr, ok);
410  if (ok) {
411  if (fabs(e.pos) > myCurrentEdge->getGeometry().length()) {
412  WRITE_ERROR("Edge '" + myCurrentID + "' has a split at invalid position " + toString(e.pos) + ".");
413  return;
414  }
415  std::vector<NBEdgeCont::Split>::iterator i = find_if(mySplits.begin(), mySplits.end(), split_by_pos_finder(e.pos));
416  if (i != mySplits.end()) {
417  WRITE_ERROR("Edge '" + myCurrentID + "' has already a split at position " + toString(e.pos) + ".");
418  return;
419  }
420  // XXX rounding to int may duplicate the id of another split
421  e.nameID = myCurrentID + "." + toString((int)e.pos);
422  if (e.pos < 0) {
424  }
425  for (const std::string& id : attrs.getOptStringVector(SUMO_ATTR_LANES, myCurrentID.c_str(), ok)) {
426  try {
427  int lane = StringUtils::toInt(id);
428  e.lanes.push_back(lane);
429  } catch (NumberFormatException&) {
430  WRITE_ERROR("Error on parsing a split (edge '" + myCurrentID + "').");
431  } catch (EmptyData&) {
432  WRITE_ERROR("Error on parsing a split (edge '" + myCurrentID + "').");
433  }
434  }
435  if (e.lanes.empty()) {
436  for (int l = 0; l < myCurrentEdge->getNumLanes(); ++l) {
437  e.lanes.push_back(l);
438  }
439  }
440  e.speed = attrs.getOpt(SUMO_ATTR_SPEED, nullptr, ok, myCurrentEdge->getSpeed());
441  if (attrs.hasAttribute(SUMO_ATTR_SPEED) && myOptions.getBool("speed-in-kmh")) {
442  e.speed /= 3.6;
443  }
444  e.idBefore = attrs.getOpt(SUMO_ATTR_ID_BEFORE, nullptr, ok, std::string(""));
445  e.idAfter = attrs.getOpt(SUMO_ATTR_ID_AFTER, nullptr, ok, std::string(""));
446  if (!ok) {
447  return;
448  }
449  const std::string nodeID = attrs.getOpt(SUMO_ATTR_ID, nullptr, ok, e.nameID);
450  if (nodeID == myCurrentEdge->getFromNode()->getID() || nodeID == myCurrentEdge->getToNode()->getID()) {
451  WRITE_ERROR("Invalid split node id for edge '" + myCurrentEdge->getID() + "' (from- and to-node are forbidden)");
452  return;
453  }
454  e.node = myNodeCont.retrieve(nodeID);
455  e.offsetFactor = OptionsCont::getOptions().getBool("lefthand") ? -1 : 1;
456  if (e.node == nullptr) {
457  e.node = new NBNode(nodeID, myCurrentEdge->getGeometry().positionAtOffset(e.pos));
458  }
461  mySplits.push_back(e);
462  }
463 }
464 
465 
466 bool
468  // the names and the coordinates of the beginning and the end node
469  // may be found, try
470  bool ok = true;
471  std::string begNodeID = myIsUpdate ? myCurrentEdge->getFromNode()->getID() : "";
472  std::string endNodeID = myIsUpdate ? myCurrentEdge->getToNode()->getID() : "";
473  std::string oldBegID = begNodeID;
474  std::string oldEndID = endNodeID;
475  if (attrs.hasAttribute(SUMO_ATTR_FROM)) {
476  begNodeID = attrs.get<std::string>(SUMO_ATTR_FROM, nullptr, ok);
477  } else if (!myIsUpdate) {
478  WRITE_ERROR("The from-node is not given for edge '" + myCurrentID + "'.");
479  ok = false;
480  }
481  if (attrs.hasAttribute(SUMO_ATTR_TO)) {
482  endNodeID = attrs.get<std::string>(SUMO_ATTR_TO, nullptr, ok);
483  } else if (!myIsUpdate) {
484  WRITE_ERROR("The to-node is not given for edge '" + myCurrentID + "'.");
485  ok = false;
486  }
487  if (!ok) {
488  return false;
489  }
490  myFromNode = myNodeCont.retrieve(begNodeID);
491  myToNode = myNodeCont.retrieve(endNodeID);
492  if (myFromNode == nullptr) {
493  WRITE_ERROR("Edge's '" + myCurrentID + "' from-node '" + begNodeID + "' is not known.");
494  }
495  if (myToNode == nullptr) {
496  WRITE_ERROR("Edge's '" + myCurrentID + "' to-node '" + endNodeID + "' is not known.");
497  }
498  return myFromNode != nullptr && myToNode != nullptr;
499 }
500 
501 
504  if (!attrs.hasAttribute(SUMO_ATTR_SHAPE)) {
505  return myShape;
506  }
507  // try to build shape
508  bool ok = true;
509  if (!attrs.hasAttribute(SUMO_ATTR_SHAPE)) {
510  myReinitKeepEdgeShape = false;
511  return PositionVector();
512  }
513  PositionVector shape = attrs.getOpt<PositionVector>(SUMO_ATTR_SHAPE, nullptr, ok, PositionVector());
515  WRITE_ERROR("Unable to project coordinates for edge '" + myCurrentID + "'.");
516  }
518  return shape;
519 }
520 
521 
524  bool ok = true;
526  std::string lsfS = toString(result);
527  lsfS = attrs.getOpt<std::string>(SUMO_ATTR_SPREADTYPE, myCurrentID.c_str(), ok, lsfS);
528  if (SUMOXMLDefinitions::LaneSpreadFunctions.hasString(lsfS)) {
530  } else {
531  WRITE_WARNING("Ignoring unknown spreadType '" + lsfS + "' for edge '" + myCurrentID + "'.");
532  }
533  return result;
534 }
535 
536 
537 void
539  bool ok = true;
540  myCurrentID = attrs.get<std::string>(SUMO_ATTR_ID, nullptr, ok);
541  if (!ok) {
542  return;
543  }
545  if (edge == nullptr) {
546  WRITE_WARNING("Ignoring tag '" + toString(SUMO_TAG_DELETE) + "' for unknown edge '" +
547  myCurrentID + "'");
548  return;
549  }
550  const int lane = attrs.getOpt<int>(SUMO_ATTR_INDEX, myCurrentID.c_str(), ok, -1);
551  if (lane < 0) {
552  myEdgeCont.extract(myDistrictCont, edge, true);
553  } else {
554  edge->deleteLane(lane, false, true);
555  }
556 }
557 
558 
559 void
561  if (myCurrentEdge == nullptr) {
562  return;
563  }
564  if (element == SUMO_TAG_EDGE) {
565  myLastParameterised.pop_back();
566  // add bike lane, wait until lanes are loaded to avoid building if it already exists
569  }
570  // add sidewalk, wait until lanes are loaded to avoid building if it already exists
573  }
574  // apply default stopOffsets of edge to all lanes without specified stopOffset.
575  std::map<SVCPermissions, double> stopOffsets = myCurrentEdge->getStopOffsets(-1);
576  if (stopOffsets.size() != 0) {
577  for (int i = 0; i < (int)myCurrentEdge->getLanes().size(); i++) {
578  myCurrentEdge->setStopOffsets(i, stopOffsets, false);
579  }
580  }
581  if (!myIsUpdate) {
582  try {
584  WRITE_ERROR("Duplicate edge occurred. ID='" + myCurrentID + "'");
585  delete myCurrentEdge;
586  }
587  } catch (InvalidArgument& e) {
588  WRITE_ERROR(e.what());
589  throw;
590  } catch (...) {
591  WRITE_ERROR("An important information is missing in edge '" + myCurrentID + "'.");
592  }
593  }
595  myCurrentEdge = nullptr;
596  } else if (element == SUMO_TAG_LANE) {
597  myLastParameterised.pop_back();
598  myCurrentLaneIndex = -1;
599  }
600 }
601 
602 
603 void
605  if (attrs.hasAttribute(SUMO_ATTR_EDGES)) {
606  std::vector<std::string> edgeIDs = attrs.getStringVector(SUMO_ATTR_EDGES);
607  EdgeSet roundabout;
608  for (std::vector<std::string>::iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) {
609  NBEdge* edge = myEdgeCont.retrieve(*it);
610  if (edge == nullptr) {
611  if (!myEdgeCont.wasIgnored(*it)) {
612  WRITE_ERROR("Unknown edge '" + (*it) + "' in roundabout");
613  }
614  } else {
615  roundabout.insert(edge);
616  }
617  }
618  myEdgeCont.addRoundabout(roundabout);
619  } else {
620  WRITE_ERROR("Empty edges in roundabout.");
621  }
622 }
623 
624 
625 /****************************************************************************/
626 
SUMO_ATTR_ENDOFFSET
@ SUMO_ATTR_ENDOFFSET
Definition: SUMOXMLDefinitions.h:414
NIXMLEdgesHandler::addSplit
void addSplit(const SUMOSAXAttributes &attrs)
Parses a split and stores it in mySplits. Splits are executed Upon reading the end tag of an edge.
Definition: NIXMLEdgesHandler.cpp:400
SUMO_ATTR_TYPE
@ SUMO_ATTR_TYPE
Definition: SUMOXMLDefinitions.h:381
NBEdge::UNSPECIFIED_OFFSET
static const double UNSPECIFIED_OFFSET
unspecified lane offset
Definition: NBEdge.h:318
SUMOSAXAttributes::getStringVector
const std::vector< std::string > getStringVector(int attr) const
Tries to read given attribute assuming it is a string vector.
Definition: SUMOSAXAttributes.cpp:113
SUMO_TAG_STOPOFFSET
@ SUMO_TAG_STOPOFFSET
Information on vClass specific stop offsets at lane end.
Definition: SUMOXMLDefinitions.h:230
SVC_UNSPECIFIED
const SVCPermissions SVC_UNSPECIFIED
permissions not specified
Definition: SUMOVehicleClass.cpp:148
ToString.h
SUMO_ATTR_ID_BEFORE
@ SUMO_ATTR_ID_BEFORE
Definition: SUMOXMLDefinitions.h:396
SUMO_ATTR_ACCELERATION
@ SUMO_ATTR_ACCELERATION
Definition: SUMOXMLDefinitions.h:892
SUMOSAXAttributes::hasAttribute
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
NIXMLEdgesHandler::myEndElement
void myEndElement(int element)
Called when a closing tag occurs.
Definition: NIXMLEdgesHandler.cpp:560
NBEdgeCont::Split::offsetFactor
int offsetFactor
direction in which to apply the offset (used by netgenerate for lefthand networks)
Definition: NBEdgeCont.h:223
NBEdgeCont::retrieve
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
Definition: NBEdgeCont.cpp:246
SUMO_ATTR_DISALLOW
@ SUMO_ATTR_DISALLOW
Definition: SUMOXMLDefinitions.h:783
NIXMLEdgesHandler::myIsUpdate
bool myIsUpdate
Whether this edge definition is an update of a previously inserted edge.
Definition: NIXMLEdgesHandler.h:193
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:275
NBEdgeCont
Storage for edges, including some functionality operating on multiple edges.
Definition: NBEdgeCont.h:60
SUMOSAXAttributes::getString
virtual std::string getString(int id) const =0
Returns the string-value of the named (by its enum-value) attribute.
SUMO_ATTR_LENGTH
@ SUMO_ATTR_LENGTH
Definition: SUMOXMLDefinitions.h:393
SUMOSAXHandler
SAX-handler base for SUMO-files.
Definition: SUMOSAXHandler.h:41
NIXMLEdgesHandler::myLastParameterised
std::vector< Parameterised * > myLastParameterised
element to receive parameters
Definition: NIXMLEdgesHandler.h:259
NBTrafficLightLogicCont
A container for traffic light definitions and built programs.
Definition: NBTrafficLightLogicCont.h:57
NBEdgeCont::erase
void erase(NBDistrictCont &dc, NBEdge *edge)
Removes the given edge from the container (deleting it)
Definition: NBEdgeCont.cpp:380
GeomConvHelper.h
OptionsCont.h
SUMO_TAG_PARAM
@ SUMO_TAG_PARAM
parameter associated to a certain key
Definition: SUMOXMLDefinitions.h:169
OptionsCont::set
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
Definition: OptionsCont.cpp:241
LANESPREAD_RIGHT
@ LANESPREAD_RIGHT
Definition: SUMOXMLDefinitions.h:1098
SUMOSAXAttributes::get
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
Definition: SUMOSAXAttributes.h:492
NIXMLEdgesHandler::myEdgeCont
NBEdgeCont & myEdgeCont
The edges container (for insertion of build edges)
Definition: NIXMLEdgesHandler.h:203
NBEdge::setLaneType
void setLaneType(int lane, const std::string &type)
set lane specific type (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3254
MsgHandler.h
NBEdge::hasDefaultGeometry
bool hasDefaultGeometry() const
Returns whether the geometry consists only of the node positions.
Definition: NBEdge.cpp:558
NIXMLEdgesHandler::myCurrentSpeed
double myCurrentSpeed
The current edge's maximum speed.
Definition: NIXMLEdgesHandler.h:145
SUMO_ATTR_NUMLANES
@ SUMO_ATTR_NUMLANES
Definition: SUMOXMLDefinitions.h:383
OptionsCont::getString
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
Definition: OptionsCont.cpp:201
SUMOSAXHandler.h
NIXMLEdgesHandler::myOptions
OptionsCont & myOptions
A reference to the program's options.
Definition: NIXMLEdgesHandler.h:135
SUMO_TAG_LANE
@ SUMO_TAG_LANE
begin/end of the description of a single lane
Definition: SUMOXMLDefinitions.h:49
NBEdgeCont::processSplits
void processSplits(NBEdge *e, std::vector< Split > splits, NBNodeCont &nc, NBDistrictCont &dc, NBTrafficLightLogicCont &tlc)
Definition: NBEdgeCont.cpp:412
NBNetBuilder::transformCoordinates
static bool transformCoordinates(PositionVector &from, bool includeInBoundary=true, GeoConvHelper *from_srs=0)
Definition: NBNetBuilder.cpp:660
NIXMLEdgesHandler.h
GeoConvHelper.h
NIXMLNodesHandler.h
OptionsCont::getBool
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
Definition: OptionsCont.cpp:222
SUMO_ATTR_REMOVE
@ SUMO_ATTR_REMOVE
Definition: SUMOXMLDefinitions.h:392
EmptyData
Definition: UtilExceptions.h:68
OptionsCont::getOptions
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:57
NBEdge::getPriority
int getPriority() const
Returns the priority of the edge.
Definition: NBEdge.h:484
NIXMLEdgesHandler::NIXMLEdgesHandler
NIXMLEdgesHandler(NBNodeCont &nc, NBEdgeCont &ec, NBTypeCont &tc, NBDistrictCont &dc, NBTrafficLightLogicCont &tlc, OptionsCont &options)
Constructor.
Definition: NIXMLEdgesHandler.cpp:55
SUMO_ATTR_PREFER
@ SUMO_ATTR_PREFER
Definition: SUMOXMLDefinitions.h:784
NBEdge::setDistance
void setDistance(double distance)
set lane specific speed (negative lane implies set for all lanes)
Definition: NBEdge.h:1279
SUMO_ATTR_SPEED
@ SUMO_ATTR_SPEED
Definition: SUMOXMLDefinitions.h:384
NBEdgeCont::insert
bool insert(NBEdge *edge, bool ignorePrunning=false)
Adds an edge to the dictionary.
Definition: NBEdgeCont.cpp:153
SUMO_ATTR_ID
@ SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:378
PositionVector::length
double length() const
Returns the length.
Definition: PositionVector.cpp:484
SUMO_ATTR_LANE
@ SUMO_ATTR_LANE
Definition: SUMOXMLDefinitions.h:637
NIXMLEdgesHandler::myTypeCont
NBTypeCont & myTypeCont
The types container (for retrieval of type defaults)
Definition: NIXMLEdgesHandler.h:206
NBEdge::setPermissions
void setPermissions(SVCPermissions permissions, int lane=-1)
set allowed/disallowed classes for the given lane or for all lanes if -1 is given
Definition: NBEdge.cpp:3376
SUMO_TAG_DELETE
@ SUMO_TAG_DELETE
delete certain element
Definition: SUMOXMLDefinitions.h:176
NIXMLEdgesHandler::addEdge
void addEdge(const SUMOSAXAttributes &attrs)
Parses an edge and stores the values in "myCurrentEdge".
Definition: NIXMLEdgesHandler.cpp:155
NBEdge::setLoadedLength
void setLoadedLength(double val)
set loaded length
Definition: NBEdge.cpp:3419
NBEdgeCont::Split::speed
double speed
The speed after this change.
Definition: NBEdgeCont.h:211
PositionVector
A list of positions.
Definition: PositionVector.h:45
NBTypeCont::knows
bool knows(const std::string &type) const
Returns whether the named type is in the container.
Definition: NBTypeCont.cpp:71
NBDistrictCont
A container for districts.
Definition: NBDistrictCont.h:52
SUMO_ATTR_SPREADTYPE
@ SUMO_ATTR_SPREADTYPE
The information about how to spread the lanes from the given position.
Definition: SUMOXMLDefinitions.h:692
NIXMLEdgesHandler::myReinitKeepEdgeShape
bool myReinitKeepEdgeShape
Whether the edge shape shall be kept at reinitilization.
Definition: NIXMLEdgesHandler.h:181
NBNodeCont
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:59
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:91
NIXMLEdgesHandler::split_by_pos_finder
Finds a split at the given position.
Definition: NIXMLEdgesHandler.h:229
SUMO_ATTR_TO
@ SUMO_ATTR_TO
Definition: SUMOXMLDefinitions.h:640
NIXMLEdgesHandler::myCurrentEndOffset
double myCurrentEndOffset
The current edge's offset till the destination node.
Definition: NIXMLEdgesHandler.h:157
parseVehicleClasses
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
Definition: SUMOVehicleClass.cpp:222
NBNode::getPosition
const Position & getPosition() const
Definition: NBNode.h:247
NBEdge::setLaneShape
void setLaneShape(int lane, const PositionVector &shape)
sets a custom lane shape
Definition: NBEdge.cpp:3368
NBEdge::setEndOffset
void setEndOffset(int lane, double offset)
set lane specific end-offset (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3300
NumberFormatException
Definition: UtilExceptions.h:95
SUMO_TAG_NEIGH
@ SUMO_TAG_NEIGH
begin/end of the description of a neighboring lane
Definition: SUMOXMLDefinitions.h:51
NBEdge::getToNode
NBNode * getToNode() const
Returns the destination node of the edge.
Definition: NBEdge.h:498
NBEdge::getGeometry
const PositionVector & getGeometry() const
Returns the geometry of the edge.
Definition: NBEdge.h:692
NBEdgeCont::Split::node
NBNode * node
The new node that is created for this split.
Definition: NBEdgeCont.h:213
NIXMLEdgesHandler::myCurrentType
std::string myCurrentType
The current edge's type.
Definition: NIXMLEdgesHandler.h:163
NBEdge::getStopOffsets
const std::map< int, double > & getStopOffsets() const
Returns the stopOffset to the end of the edge.
Definition: NBEdge.h:623
NBTypeCont::getSpeed
double getSpeed(const std::string &type) const
Returns the maximal velocity for the given type [m/s].
Definition: NBTypeCont.cpp:177
StringBijection::get
T get(const std::string &str) const
Definition: StringBijection.h:97
SUMOSAXAttributes::getOptStringVector
const std::vector< std::string > getOptStringVector(int attr, const char *objectid, bool &ok, bool report=true) const
convenience function to avoid the default argument and the template stuff at getOpt<>
Definition: SUMOSAXAttributes.cpp:123
EdgeSet
std::set< NBEdge * > EdgeSet
container for unique edges
Definition: NBCont.h:49
NBTypeCont.h
PositionVector::positionAtOffset
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
Definition: PositionVector.cpp:248
SUMO_ATTR_WIDTH
@ SUMO_ATTR_WIDTH
Definition: SUMOXMLDefinitions.h:386
SUMO_ATTR_EDGES
@ SUMO_ATTR_EDGES
the edges of a route
Definition: SUMOXMLDefinitions.h:427
NIXMLEdgesHandler::myBikeLaneWidth
double myBikeLaneWidth
The width of the bike lane that shall be added to the current edge.
Definition: NIXMLEdgesHandler.h:187
NBEdgeCont::Split::lanes
std::vector< int > lanes
The lanes after this change.
Definition: NBEdgeCont.h:207
NIXMLEdgesHandler::mySidewalkWidth
double mySidewalkWidth
The width of the sidewalk that shall be added to the current edge.
Definition: NIXMLEdgesHandler.h:184
NIXMLEdgesHandler::myShape
PositionVector myShape
The shape of the edge.
Definition: NIXMLEdgesHandler.h:172
NBEdge::getNumLanes
int getNumLanes() const
Returns the number of lanes.
Definition: NBEdge.h:477
SUMO_TAG_EDGE
@ SUMO_TAG_EDGE
begin/end of the description of an edge
Definition: SUMOXMLDefinitions.h:47
NBEdge::hasLoadedLength
bool hasLoadedLength() const
Returns whether a length was set explicitly.
Definition: NBEdge.h:564
NBNetBuilder.h
NBEdge::setSpeed
void setSpeed(int lane, double speed)
set lane specific speed (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3345
NIXMLEdgesHandler::myHaveReportedAboutOverwriting
bool myHaveReportedAboutOverwriting
Information whether at least one edge's attributes were overwritten.
Definition: NIXMLEdgesHandler.h:248
NIXMLEdgesHandler::myNodeCont
NBNodeCont & myNodeCont
The nodes container (for retrieval of referenced nodes)
Definition: NIXMLEdgesHandler.h:200
NIXMLEdgesHandler::myTLLogicCont
NBTrafficLightLogicCont & myTLLogicCont
The traffic lights container to add built tls to (when invalidating tls because of splits)
Definition: NIXMLEdgesHandler.h:213
NIXMLEdgesHandler::myFromNode
NBNode * myFromNode
The nodes the edge starts and ends at.
Definition: NIXMLEdgesHandler.h:166
NBEdge::setPreferredVehicleClass
void setPreferredVehicleClass(SVCPermissions permissions, int lane=-1)
set preferred Vehicle Class
Definition: NBEdge.cpp:3390
NIXMLEdgesHandler::myLength
double myLength
The current edge's length.
Definition: NIXMLEdgesHandler.h:169
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
NIXMLEdgesHandler::myCurrentEdge
NBEdge * myCurrentEdge
The currently processed edge.
Definition: NIXMLEdgesHandler.h:218
NBEdge::getLaneStruct
Lane & getLaneStruct(int lane)
Definition: NBEdge.h:1287
NIXMLEdgesHandler::~NIXMLEdgesHandler
~NIXMLEdgesHandler()
Destructor.
Definition: NIXMLEdgesHandler.cpp:77
NBTypeCont::getPriority
int getPriority(const std::string &type) const
Returns the priority for the given type.
Definition: NBTypeCont.cpp:183
SUMOSAXAttributes::getOpt
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.
Definition: SUMOSAXAttributes.h:518
NBEdge::addSidewalk
void addSidewalk(double width)
add a pedestrian sidewalk of the given width and shift existing connctions
Definition: NBEdge.cpp:3545
NBEdge::addBikeLane
void addBikeLane(double width)
add a bicycle lane of the given width and shift existing connctions
Definition: NBEdge.cpp:3557
SUMO_ATTR_DISTANCE
@ SUMO_ATTR_DISTANCE
Definition: SUMOXMLDefinitions.h:395
NBEdge::UNSPECIFIED_SPEED
static const double UNSPECIFIED_SPEED
unspecified lane speed
Definition: NBEdge.h:321
NBEdgeCont::Split::pos
double pos
The position of this change.
Definition: NBEdgeCont.h:209
SUMO_ATTR_POSITION
@ SUMO_ATTR_POSITION
Definition: SUMOXMLDefinitions.h:660
NBNodeCont::retrieve
NBNode * retrieve(const std::string &id) const
Returns the node with the given name.
Definition: NBNodeCont.cpp:107
NBEdge::getLanes
const std::vector< NBEdge::Lane > & getLanes() const
Returns the lane definitions.
Definition: NBEdge.h:656
OptionsCont::isDefault
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
Definition: OptionsCont.cpp:163
NBEdge::UNSPECIFIED_LOADED_LENGTH
static const double UNSPECIFIED_LOADED_LENGTH
no length override given
Definition: NBEdge.h:330
NBEdge::getStreetName
const std::string & getStreetName() const
Returns the street name of this edge.
Definition: NBEdge.h:600
SUMO_ATTR_INDEX
@ SUMO_ATTR_INDEX
Definition: SUMOXMLDefinitions.h:804
SUMO_ATTR_FROM
@ SUMO_ATTR_FROM
Definition: SUMOXMLDefinitions.h:639
SUMO_ATTR_ID_AFTER
@ SUMO_ATTR_ID_AFTER
Definition: SUMOXMLDefinitions.h:397
SUMO_ATTR_LANES
@ SUMO_ATTR_LANES
Definition: SUMOXMLDefinitions.h:638
NBEdge::getLoadedLength
double getLoadedLength() const
Returns the length was set explicitly or the computed length if it wasn't set.
Definition: NBEdge.h:554
NIXMLEdgesHandler::myHaveWarnedAboutDeprecatedLaneId
bool myHaveWarnedAboutDeprecatedLaneId
Definition: NIXMLEdgesHandler.h:253
NIXMLEdgesHandler::myDistrictCont
NBDistrictCont & myDistrictCont
The districts container (needed if an edge must be split)
Definition: NIXMLEdgesHandler.h:209
NBEdge::getLength
double getLength() const
Returns the computed length of the edge.
Definition: NBEdge.h:545
NIXMLEdgesHandler::addLane
void addLane(const SUMOSAXAttributes &attrs)
Parses a lane and modifies myCurrentEdge according to the given attribures.
Definition: NIXMLEdgesHandler.cpp:330
NBNodeCont.h
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
StringUtils.h
NIXMLEdgesHandler::myToNode
NBNode * myToNode
Definition: NIXMLEdgesHandler.h:166
NIXMLEdgesHandler::setNodes
bool setNodes(const SUMOSAXAttributes &attrs)
Sets from/to node information of the currently parsed edge.
Definition: NIXMLEdgesHandler.cpp:467
NIXMLEdgesHandler::mySplits
std::vector< NBEdgeCont::Split > mySplits
The list of this edge's splits.
Definition: NIXMLEdgesHandler.h:224
StringUtils::toInt
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
Definition: StringUtils.cpp:278
SUMO_ATTR_PRIORITY
@ SUMO_ATTR_PRIORITY
Definition: SUMOXMLDefinitions.h:382
NIXMLEdgesHandler::myCurrentWidth
double myCurrentWidth
The current edge's lane width.
Definition: NIXMLEdgesHandler.h:154
NBEdge::deleteLane
void deleteLane(int index, bool recompute, bool shiftIndices)
delete lane
Definition: NBEdge.cpp:3161
SUMO_ATTR_SIDEWALKWIDTH
@ SUMO_ATTR_SIDEWALKWIDTH
Definition: SUMOXMLDefinitions.h:390
NBTypeCont::getPermissions
SVCPermissions getPermissions(const std::string &type) const
Returns allowed vehicle classes for the given type.
Definition: NBTypeCont.cpp:221
NIXMLEdgesHandler::myLanesSpread
LaneSpreadFunction myLanesSpread
Information about how to spread the lanes.
Definition: NIXMLEdgesHandler.h:175
NIXMLEdgesHandler::myPermissions
SVCPermissions myPermissions
Information about lane permissions.
Definition: NIXMLEdgesHandler.h:178
NBEdge::reinit
void reinit(NBNode *from, NBNode *to, const std::string &type, double speed, int nolanes, int priority, PositionVector geom, double width, double endOffset, const std::string &streetName, LaneSpreadFunction spread=LANESPREAD_RIGHT, bool tryIgnoreNodePositions=false)
Resets initial values.
Definition: NBEdge.cpp:374
NBEdge::setAcceleration
void setAcceleration(int lane, bool accelRamp)
marks one lane as acceleration lane
Definition: NBEdge.cpp:3360
NBEdge::setLaneWidth
void setLaneWidth(int lane, double width)
set lane specific width (negative lane implies set for all lanes)
Definition: NBEdge.cpp:3239
NIXMLEdgesHandler::deleteEdge
void deleteEdge(const SUMOSAXAttributes &attrs)
parses delete tag and deletes the specified edge or lane
Definition: NIXMLEdgesHandler.cpp:538
NBTypeCont
A storage for available types of edges.
Definition: NBTypeCont.h:54
NIXMLEdgesHandler::myKeepEdgeShape
const bool myKeepEdgeShape
Whether the edge shape shall be kept generally.
Definition: NIXMLEdgesHandler.h:256
NBEdge::getSpeed
double getSpeed() const
Returns the speed allowed on this edge.
Definition: NBEdge.h:571
InvalidArgument
Definition: UtilExceptions.h:56
SUMO_ATTR_KEY
@ SUMO_ATTR_KEY
Definition: SUMOXMLDefinitions.h:408
NIXMLEdgesHandler::myStartElement
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Definition: NIXMLEdgesHandler.cpp:81
NBEdge::Lane::oppositeID
std::string oppositeID
An opposite lane ID, if given.
Definition: NBEdge.h:169
NIXMLEdgesHandler::myCurrentLaneIndex
int myCurrentLaneIndex
The currently processed lane index.
Definition: NIXMLEdgesHandler.h:221
SUMO_ATTR_BIKELANEWIDTH
@ SUMO_ATTR_BIKELANEWIDTH
Definition: SUMOXMLDefinitions.h:391
SUMO_ATTR_VALUE
@ SUMO_ATTR_VALUE
Definition: SUMOXMLDefinitions.h:779
NBEdgeCont::extract
void extract(NBDistrictCont &dc, NBEdge *edge, bool remember=false)
Removes the given edge from the container like erase but does not delete it.
Definition: NBEdgeCont.cpp:387
NBTypeCont::getWidth
double getWidth(const std::string &type) const
Returns the lane width for the given type [m].
Definition: NBTypeCont.cpp:227
NBTypeCont::getNumLanes
int getNumLanes(const std::string &type) const
Returns the number of lanes for the given type.
Definition: NBTypeCont.cpp:171
SUMO_ATTR_ALLOW
@ SUMO_ATTR_ALLOW
Definition: SUMOXMLDefinitions.h:782
NBEdgeCont::Split::idAfter
std::string idAfter
The id for the edge after the split.
Definition: NBEdgeCont.h:217
parseStopOffsets
std::map< SVCPermissions, double > parseStopOffsets(const SUMOSAXAttributes &attrs, bool &ok)
Extract stopOffsets from attributes of stopOffset element.
Definition: SUMOVehicleClass.cpp:392
NBEdge::UNSPECIFIED_WIDTH
static const double UNSPECIFIED_WIDTH
unspecified lane width
Definition: NBEdge.h:315
NIXMLEdgesHandler::myHaveReportedAboutTypeOverride
bool myHaveReportedAboutTypeOverride
Information whether at least one edge's type was changed.
Definition: NIXMLEdgesHandler.h:251
LaneSpreadFunction
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge's lateral offset shal...
Definition: SUMOXMLDefinitions.h:1097
NBEdge::getTypeID
const std::string & getTypeID() const
get ID of type
Definition: NBEdge.h:1074
NIXMLEdgesHandler::myCurrentStreetName
std::string myCurrentStreetName
The current edge's street name.
Definition: NIXMLEdgesHandler.h:160
config.h
NBEdgeCont::addRoundabout
void addRoundabout(const EdgeSet &roundabout)
add user specified roundabout
Definition: NBEdgeCont.cpp:1353
SUMOXMLDefinitions::LaneSpreadFunctions
static StringBijection< LaneSpreadFunction > LaneSpreadFunctions
lane spread functions
Definition: SUMOXMLDefinitions.h:1374
NIXMLEdgesHandler::addRoundabout
void addRoundabout(const SUMOSAXAttributes &attrs)
Parses a roundabout and stores it in myEdgeCont.
Definition: NIXMLEdgesHandler.cpp:604
StringTokenizer.h
NBTypeCont::getSidewalkWidth
double getSidewalkWidth(const std::string &type) const
Returns the lane width for a sidewalk to be added [m].
Definition: NBTypeCont.cpp:233
SUMO_ATTR_NAME
@ SUMO_ATTR_NAME
Definition: SUMOXMLDefinitions.h:380
NBNode
Represents a single node (junction) during network building.
Definition: NBNode.h:67
SUMOSAXAttributes::getStringSecure
virtual std::string getStringSecure(int id, const std::string &def) const =0
Returns the string-value of the named (by its enum-value) attribute.
SUMO_TAG_ROUNDABOUT
@ SUMO_TAG_ROUNDABOUT
roundabout defined in junction
Definition: SUMOXMLDefinitions.h:220
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:56
SUMO_ATTR_SHAPE
@ SUMO_ATTR_SHAPE
edge: the shape in xml-definition
Definition: SUMOXMLDefinitions.h:690
NBEdgeCont::Split
A structure which describes changes of lane number or speed along the road.
Definition: NBEdgeCont.h:205
NIXMLEdgesHandler::myCurrentLaneNo
int myCurrentLaneNo
The current edge's number of lanes.
Definition: NIXMLEdgesHandler.h:151
Named::getID
const std::string & getID() const
Returns the id.
Definition: Named.h:76
NIXMLNodesHandler::processNodeType
static NBNode * processNodeType(const SUMOSAXAttributes &attrs, NBNode *node, const std::string &nodeID, const Position &position, bool updateEdgeGeometries, NBNodeCont &nc, NBEdgeCont &ec, NBTrafficLightLogicCont &tlc)
parses node attributes (not related to positioning)
Definition: NIXMLNodesHandler.cpp:165
SUMO_TAG_SPLIT
@ SUMO_TAG_SPLIT
split something
Definition: SUMOXMLDefinitions.h:206
NIXMLEdgesHandler::tryGetShape
PositionVector tryGetShape(const SUMOSAXAttributes &attrs)
Tries to parse the shape definition.
Definition: NIXMLEdgesHandler.cpp:503
WRITE_ERROR
#define WRITE_ERROR(msg)
Definition: MsgHandler.h:283
NBEdgeCont::Split::idBefore
std::string idBefore
The id for the edge before the split.
Definition: NBEdgeCont.h:215
NBTypeCont::getBikeLaneWidth
double getBikeLaneWidth(const std::string &type) const
Returns the lane width for a bike lane to be added [m].
Definition: NBTypeCont.cpp:239
NBEdge::getFromNode
NBNode * getFromNode() const
Returns the origin node of the edge.
Definition: NBEdge.h:491
WRITE_MESSAGE
#define WRITE_MESSAGE(msg)
Definition: MsgHandler.h:277
NIXMLEdgesHandler::myCurrentPriority
int myCurrentPriority
The current edge's priority.
Definition: NIXMLEdgesHandler.h:148
SUMOXMLDefinitions.h
NBEdge::setStopOffsets
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)
Definition: NBEdge.cpp:3316
NBEdgeCont::wasIgnored
bool wasIgnored(std::string id) const
Returns whether the edge with the id was ignored during parsing.
Definition: NBEdgeCont.h:501
NIXMLEdgesHandler::tryGetLaneSpread
LaneSpreadFunction tryGetLaneSpread(const SUMOSAXAttributes &attrs)
Tries to parse the spread type.
Definition: NIXMLEdgesHandler.cpp:523
NBEdge::getDistance
double getDistance() const
Definition: NBEdge.h:616
NIXMLEdgesHandler::myCurrentID
std::string myCurrentID
The current edge's id.
Definition: NIXMLEdgesHandler.h:142
NBEdge::getLaneSpreadFunction
LaneSpreadFunction getLaneSpreadFunction() const
Returns how this edge's lanes' lateral offset is computed.
Definition: NBEdge.h:777
NBEdgeCont::Split::nameID
std::string nameID
the default node id
Definition: NBEdgeCont.h:219
NBEdge::getID
const std::string & getID() const
Definition: NBEdge.h:1380