Eclipse SUMO - Simulation of Urban MObility
NIImporter_DlrNavteq.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 /****************************************************************************/
16 // Importer for networks stored in Elmar's format
17 /****************************************************************************/
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include <string>
26 #include <sstream>
27 #include <limits>
33 #include <utils/common/ToString.h>
38 #include <netbuild/NBNetBuilder.h>
39 #include <netbuild/NBNode.h>
40 #include <netbuild/NBNodeCont.h>
41 #include <netbuild/NBEdge.h>
42 #include <netbuild/NBEdgeCont.h>
43 #include <netbuild/NBTypeCont.h>
44 #include <netbuild/NBOwnTLDef.h>
46 #include "NILoader.h"
47 #include "NIImporter_DlrNavteq.h"
48 
49 
50 // ---------------------------------------------------------------------------
51 // static members
52 // ---------------------------------------------------------------------------
53 const std::string NIImporter_DlrNavteq::GEO_SCALE("1e-5");
54 const int NIImporter_DlrNavteq::EdgesHandler::MISSING_COLUMN = std::numeric_limits<int>::max();
55 const std::string NIImporter_DlrNavteq::UNDEFINED("-1");
56 
57 // ===========================================================================
58 // method definitions
59 // ===========================================================================
60 // ---------------------------------------------------------------------------
61 // static methods
62 // ---------------------------------------------------------------------------
63 void
65  // check whether the option is set (properly)
66  if (!oc.isSet("dlr-navteq-prefix")) {
67  return;
68  }
69  time_t csTime;
70  time(&csTime);
71  // parse file(s)
72  LineReader lr;
73  // load nodes
74  std::map<std::string, PositionVector> myGeoms;
75  PROGRESS_BEGIN_MESSAGE("Loading nodes");
76  std::string file = oc.getString("dlr-navteq-prefix") + "_nodes_unsplitted.txt";
77  NodesHandler handler1(nb.getNodeCont(), file, myGeoms);
78  if (!lr.setFile(file)) {
79  throw ProcessError("The file '" + file + "' could not be opened.");
80  }
81  lr.readAll(handler1);
83 
84  // load street names if given and wished
85  std::map<std::string, std::string> streetNames; // nameID : name
86  if (oc.getBool("output.street-names")) {
87  file = oc.getString("dlr-navteq-prefix") + "_names.txt";
88  if (lr.setFile(file)) {
89  PROGRESS_BEGIN_MESSAGE("Loading street names");
90  NamesHandler handler4(file, streetNames);
91  lr.readAll(handler4);
93  } else {
94  WRITE_WARNING("Output will not contain street names because the file '" + file + "' was not found");
95  }
96  }
97 
98  // load edges
99  PROGRESS_BEGIN_MESSAGE("Loading edges");
100  file = oc.getString("dlr-navteq-prefix") + "_links_unsplitted.txt";
101  // parse the file
102  EdgesHandler handler2(nb.getNodeCont(), nb.getEdgeCont(), nb.getTypeCont(), file, myGeoms, streetNames);
103  if (!lr.setFile(file)) {
104  throw ProcessError("The file '" + file + "' could not be opened.");
105  }
106  lr.readAll(handler2);
109 
110  // load traffic lights if given
111  file = oc.getString("dlr-navteq-prefix") + "_traffic_signals.txt";
112  if (lr.setFile(file)) {
113  PROGRESS_BEGIN_MESSAGE("Loading traffic lights");
114  TrafficlightsHandler handler3(nb.getNodeCont(), nb.getTLLogicCont(), nb.getEdgeCont(), file);
115  lr.readAll(handler3);
117  }
118 
119  // load prohibited manoeuvres if given
120  file = oc.getString("dlr-navteq-prefix") + "_prohibited_manoeuvres.txt";
121  if (lr.setFile(file)) {
122  PROGRESS_BEGIN_MESSAGE("Loading prohibited manoeuvres");
123  ProhibitionHandler handler6(nb.getEdgeCont(), file, csTime);
124  lr.readAll(handler6);
126  }
127 
128  // load connected lanes if given
129  file = oc.getString("dlr-navteq-prefix") + "_connected_lanes.txt";
130  if (lr.setFile(file)) {
131  PROGRESS_BEGIN_MESSAGE("Loading connected lanes");
132  ConnectedLanesHandler handler7(nb.getEdgeCont());
133  lr.readAll(handler7);
135  }
136 
137  // load time restrictions if given
138  file = oc.getString("dlr-navteq-prefix") + "_links_timerestrictions.txt";
139  if (lr.setFile(file)) {
140  PROGRESS_BEGIN_MESSAGE("Loading time restrictions");
141  if (!oc.isDefault("construction-date")) {
142  csTime = readDate(oc.getString("construction-date"));
143  }
144  TimeRestrictionsHandler handler5(nb.getEdgeCont(), nb.getDistrictCont(), csTime);
145  lr.readAll(handler5);
146  handler5.printSummary();
148  }
149 }
150 
151 double
152 NIImporter_DlrNavteq::readVersion(const std::string& line, const std::string& file) {
153  assert(line[0] == '#');
154  const std::string marker = "extraction version: v";
155  const std::string lowerCase = StringUtils::to_lower_case(line);
156  if (lowerCase.find(marker) == std::string::npos) {
157  return -1;
158  }
159  const int vStart = (int)(lowerCase.find(marker) + marker.size());
160  const int vEnd = (int)line.find(" ", vStart);
161  try {
162  const double version = StringUtils::toDouble(line.substr(vStart, vEnd - vStart));
163  if (version < 0) {
164  throw ProcessError("Invalid version number '" + toString(version) + "' in file '" + file + "'.");
165  }
166  return version;
167  } catch (NumberFormatException&) {
168  throw ProcessError("Non-numerical value '" + line.substr(vStart, vEnd - vStart) + "' for version string in file '" + file + "'.");
169  }
170 }
171 
172 
173 // ---------------------------------------------------------------------------
174 // definitions of NIImporter_DlrNavteq::NodesHandler-methods
175 // ---------------------------------------------------------------------------
177  const std::string& file,
178  std::map<std::string, PositionVector>& geoms)
179  : myNodeCont(nc), myGeoms(geoms) {
180  UNUSED_PARAMETER(file);
181 }
182 
183 
185 
186 
187 bool
188 NIImporter_DlrNavteq::NodesHandler::report(const std::string& result) {
189  if (result[0] == '#') {
190  return true;
191  }
192  std::string id;
193  double x, y;
194  int no_geoms, intermediate;
195  // parse
196  std::istringstream stream(result);
197  // id
198  stream >> id;
199  if (stream.fail()) {
200  throw ProcessError("Something is wrong with the following data line\n" + result);
201  }
202  // intermediate?
203  stream >> intermediate;
204  if (stream.fail()) {
205  if (myNodeCont.size() == 0) { // be generous with extra data at beginning of file
206  return true;
207  }
208  throw ProcessError("Non-numerical value for intermediate status in node " + id + ".");
209  }
210  // number of geometrical information
211  stream >> no_geoms;
212  if (stream.fail()) {
213  throw ProcessError("Non-numerical value for number of geometries in node " + id + ".");
214  }
215  // geometrical information
216  PositionVector geoms;
217  for (int i = 0; i < no_geoms; i++) {
218  stream >> x;
219  if (stream.fail()) {
220  throw ProcessError("Non-numerical value for x-position in node " + id + ".");
221  }
222  stream >> y;
223  if (stream.fail()) {
224  throw ProcessError("Non-numerical value for y-position in node " + id + ".");
225  }
226  Position pos(x, y);
227  if (!NBNetBuilder::transformCoordinate(pos, true)) {
228  throw ProcessError("Unable to project coordinates for node " + id + ".");
229  }
230  geoms.push_back(pos);
231  }
232 
233  if (intermediate == 0) {
234  NBNode* n = new NBNode(id, geoms[0]);
235  if (!myNodeCont.insert(n)) {
236  delete n;
237  throw ProcessError("Could not add node '" + id + "'.");
238  }
239  } else {
240  myGeoms[id] = geoms;
241  }
242  return true;
243 }
244 
245 
246 // ---------------------------------------------------------------------------
247 // definitions of NIImporter_DlrNavteq::EdgesHandler-methods
248 // ---------------------------------------------------------------------------
250  NBTypeCont& tc, const std::string& file,
251  std::map<std::string, PositionVector>& geoms,
252  std::map<std::string, std::string>& streetNames):
253  myNodeCont(nc),
254  myEdgeCont(ec),
255  myTypeCont(tc),
256  myGeoms(geoms),
257  myStreetNames(streetNames),
258  myVersion(0),
259  myFile(file) {
260 }
261 
262 
264 
265 
266 bool
267 NIImporter_DlrNavteq::EdgesHandler::report(const std::string& result) {
268  // parse version number from first comment line and initialize column definitions
269  if (result[0] == '#') {
270  if (!myColumns.empty()) {
271  return true;
272  }
273  const double version = readVersion(result, myFile);
274  if (version > 0) {
275  myVersion = version;
276  // init columns
277  const int NUM_COLUMNS = 25; // @note arrays must match this size!
278  const int MC = MISSING_COLUMN;
279  if (myVersion < 3) {
280  const int columns[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, MC, 12, 13, 14, 15, 16, 17, 18, 19, 20, MC, MC, -21};
281  myColumns = std::vector<int>(columns, columns + NUM_COLUMNS);
282  } else if (myVersion < 6) {
283  const int columns[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, MC, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -23};
284  myColumns = std::vector<int>(columns, columns + NUM_COLUMNS);
285  } else {
286  const int columns[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
287  myColumns = std::vector<int>(columns, columns + NUM_COLUMNS);
288  }
289  }
290  return true;
291  }
292  if (myColumns.empty()) {
293  throw ProcessError("Missing version string in file '" + myFile + "'.");
294  }
295  // interpret link attributes
297  const std::string id = getColumn(st, LINK_ID);
298  // form of way (for priority and permissions)
299  int form_of_way;
300  try {
301  form_of_way = StringUtils::toInt(getColumn(st, FORM_OF_WAY));
302  } catch (NumberFormatException&) {
303  throw ProcessError("Non-numerical value for form_of_way of link '" + id + "'.");
304  }
305  // brunnel type (bridge/tunnel/ferry (for permissions)
306  int brunnel_type;
307  try {
308  brunnel_type = StringUtils::toInt(getColumn(st, BRUNNEL_TYPE));
309  } catch (NumberFormatException&) {
310  throw ProcessError("Non-numerical value for brunnel_type of link '" + id + "'.");
311  }
312  // priority based on street_type / frc
313  int priority;
314  try {
315  priority = -StringUtils::toInt(getColumn(st, FUNCTIONAL_ROAD_CLASS));
316  // lower priority using form_of_way
317  if (form_of_way == 11) {
318  priority -= 1; // frontage road, very often with lowered curb
319  } else if (form_of_way > 11) {
320  priority -= 2; // parking/service access assume lowered curb
321  }
322  } catch (NumberFormatException&) {
323  throw ProcessError("Non-numerical value for street_type of link '" + id + "').");
324  }
325  // street name
326  std::string streetName = getStreetNameFromIDs(
327  getColumn(st, NAME_ID1_REGIONAL),
328  getColumn(st, NAME_ID2_LOCAL));
329  // try to get the nodes
330  const std::string fromID = getColumn(st, NODE_ID_FROM);
331  const std::string toID = getColumn(st, NODE_ID_TO);
332  NBNode* from = myNodeCont.retrieve(fromID);
333  NBNode* to = myNodeCont.retrieve(toID);
334  if (from == nullptr) {
335  throw ProcessError("The from-node '" + fromID + "' of link '" + id + "' could not be found");
336  }
337  if (to == nullptr) {
338  throw ProcessError("The to-node '" + toID + "' of link '" + id + "' could not be found");
339  }
340  // speed
341  double speed;
342  try {
343  speed = StringUtils::toInt(getColumn(st, SPEED_RESTRICTION, "-1")) / 3.6;
344  } catch (NumberFormatException&) {
345  throw ProcessError("Non-numerical value for the SPEED_RESTRICTION of link '" + id + "'.");
346  }
347  if (speed < 0) {
348  // speed category as fallback
349  speed = NINavTeqHelper::getSpeed(id, getColumn(st, SPEED_CATEGORY));
350  }
351  // number of lanes
352  int numLanes;
353  try {
354  // EXTENDED_NUMBER_OF_LANES is prefered but may not be defined
355  numLanes = StringUtils::toInt(getColumn(st, EXTENDED_NUMBER_OF_LANES, "-1"));
356  if (numLanes == -1) {
357  numLanes = NINavTeqHelper::getLaneNumber(id, getColumn(st, NUMBER_OF_LANES), speed);
358  }
359  } catch (NumberFormatException&) {
360  throw ProcessError("Non-numerical value for the number of lanes of link '" + id + "'.");
361  }
362 
363  const std::string navTeqTypeId = getColumn(st, VEHICLE_TYPE) + "_" + getColumn(st, FORM_OF_WAY);
364  // build the edge
365  NBEdge* e = nullptr;
366  const std::string interID = getColumn(st, BETWEEN_NODE_ID);
367  if (interID == "-1") {
368  e = new NBEdge(id, from, to, myTypeCont.knows(navTeqTypeId) ? navTeqTypeId : "", speed, numLanes, priority,
370  } else {
371  PositionVector geoms = myGeoms[interID];
372  if (getColumn(st, CONNECTION, "0") == "1") {
373  geoms = geoms.reverse();
374  }
375  geoms.insert(geoms.begin(), from->getPosition());
376  geoms.push_back(to->getPosition());
377  const std::string origID = OptionsCont::getOptions().getBool("output.original-names") ? id : "";
378  e = new NBEdge(id, from, to, myTypeCont.knows(navTeqTypeId) ? navTeqTypeId : "", speed, numLanes, priority,
380  }
381 
382  // NavTeq imports can be done with a typemap (if supplied), if not, the old defaults are used
383  if (myTypeCont.knows(navTeqTypeId)) {
384  e->setPermissions(myTypeCont.getPermissions(navTeqTypeId));
385  } else {
386  // add vehicle type information to the edge
387  if (myVersion < 6.0) {
388  NINavTeqHelper::addVehicleClasses(*e, getColumn(st, VEHICLE_TYPE));
389  } else {
390  NINavTeqHelper::addVehicleClassesV6(*e, getColumn(st, VEHICLE_TYPE));
391  }
392  if (e->getPermissions() == SVCAll) {
393  e->setPermissions(myTypeCont.getPermissions(""));
394  }
395  // permission modifications based on form_of_way
396  if (form_of_way == 14) { // pedestrian area (fussgaengerzone)
397  // unfortunately, the veh_type string is misleading in this case
399  }
400  // permission modifications based on brunnel_type
401  if (brunnel_type == 10) { // ferry
402  e->setPermissions(SVC_SHIP, -1);
403  }
404  }
405 
406  // insert the edge to the network
407  if (!myEdgeCont.insert(e)) {
408  delete e;
409  throw ProcessError("Could not add edge '" + id + "'.");
410  }
411  return true;
412 }
413 
414 
415 std::string
416 NIImporter_DlrNavteq::EdgesHandler::getColumn(const StringTokenizer& st, ColumnName name, const std::string fallback) {
417  assert(!myColumns.empty());
418  if (myColumns[name] == MISSING_COLUMN) {
419  if (fallback == "") {
420  throw ProcessError("Missing column " + toString(name) + ".");
421  } else {
422  return fallback;
423  }
424  } else if (myColumns[name] >= 0) {
425  return st.get((int)(myColumns[name]));
426  } else {
427  // negative column number implies an optional column
428  if ((int) st.size() <= -myColumns[name]) {
429  // the column is not present
430  if (fallback == "") {
431  throw ProcessError("Missing optional column " + toString(name) + " without default value.");
432  } else {
433  return fallback;
434  }
435  } else {
436  return st.get((int)(-myColumns[name]));
437  }
438  }
439 }
440 
441 
442 std::string
444  const std::string& regionalID, const std::string& localID) const {
445  std::string result = "";
446  bool hadRegional = false;
447  if (myStreetNames.count(regionalID) > 0) {
448  hadRegional = true;
449  result += myStreetNames[regionalID];
450  }
451  if (myStreetNames.count(localID) > 0) {
452  if (hadRegional) {
453  result += " / ";
454  }
455  result += myStreetNames[localID];
456  }
457  return result;
458 }
459 
460 // ---------------------------------------------------------------------------
461 // definitions of NIImporter_DlrNavteq::TrafficlightsHandler-methods
462 // ---------------------------------------------------------------------------
465  NBEdgeCont& ne,
466  const std::string& file) :
467  myNodeCont(nc),
468  myTLLogicCont(tlc),
469  myEdgeCont(ne) {
470  UNUSED_PARAMETER(file);
471 }
472 
473 
475 
476 
477 bool
479 // #ID POICOL-TYPE DESCRIPTION LONGITUDE LATITUDE NAVTEQ_LINK_ID NODEID
480 
481  if (result[0] == '#') {
482  return true;
483  }
485  const std::string edgeID = st.get(5);
486  NBEdge* edge = myEdgeCont.retrieve(edgeID);
487  if (edge == nullptr) {
488  WRITE_WARNINGF("The traffic light edge '%' could not be found.", edgeID);
489  } else {
490  NBNode* node = edge->getToNode();
491  if (node->getType() != NODETYPE_TRAFFIC_LIGHT) {
492  node->reinit(node->getPosition(), NODETYPE_TRAFFIC_LIGHT);
493  // @note. There may be additional information somewhere in the GDF files about traffic light type ...
495  // @note actually we could use the navteq node ID here
496  NBTrafficLightDefinition* tlDef = new NBOwnTLDef(node->getID(), node, 0, type);
497  if (!myTLLogicCont.insert(tlDef)) {
498  // actually, nothing should fail here
499  delete tlDef;
500  throw ProcessError("Could not allocate tls for '" + node->getID() + "'.");
501  }
502  }
503  }
504  return true;
505 }
506 
507 
508 // ---------------------------------------------------------------------------
509 // definitions of NIImporter_DlrNavteq::NamesHandler-methods
510 // ---------------------------------------------------------------------------
512  const std::string& file, std::map<std::string, std::string>& streetNames) :
513  myStreetNames(streetNames) {
514  UNUSED_PARAMETER(file);
515 }
516 
517 
519 
520 
521 bool
522 NIImporter_DlrNavteq::NamesHandler::report(const std::string& result) {
523 // # NAME_ID Name
524  if (result[0] == '#') {
525  return true;
526  }
528  if (st.size() == 1) {
529  return true; // one line with the number of data containing lines in it (also starts with a comment # since ersion 6.5)
530  }
531  assert(st.size() >= 2);
532  const std::string id = st.next();
533  if (st.size() > 2) {
534  const std::string permanent_id_info = st.next();
535  }
536  myStreetNames[id] = st.next();
537  return true;
538 }
539 
540 
541 // ---------------------------------------------------------------------------
542 // definitions of NIImporter_DlrNavteq::TimeRestrictionsHandler-methods
543 // ---------------------------------------------------------------------------
545  myEdgeCont(ec),
546  myDistrictCont(dc),
547  myConstructionTime(constructionTime),
548  myCS_min(std::numeric_limits<time_t>::max()),
549  myCS_max(std::numeric_limits<time_t>::min()),
550  myConstructionEntries(0),
551  myNotStarted(0),
552  myUnderConstruction(0),
553  myFinished(0),
554  myRemovedEdges(0) {
555 }
556 
557 
559 
560 
561 bool
563 // # NAME_ID Name
564  if (result[0] == '#') {
565  return true;
566  }
568  const std::string id = st.next();
569  const std::string type = st.next();
570  const std::string directionOfFlow = st.next(); // can be ignored since unidirectional edge ids are referenced in the file
571  const std::string throughTraffic = st.next();
572  const std::string vehicleType = st.next();
573  const std::string validityPeriod = st.next();
574  const std::string warning = "Unrecognized TIME_REC '" + validityPeriod + "'";
575  if (type == "CS") {
576  myConstructionEntries++;
577  if (validityPeriod.size() > 1024) {
578  WRITE_WARNING(warning);
579  }
580  // construction
581  char start[1024];
582  char duration[1024];
583 
584  int matched;
585 
586  matched = sscanf(validityPeriod.c_str(), "[(%[^)]){%[^}]}]", start, duration);
587  if (matched == 2) {
588  time_t tStart = readTimeRec(start, "");
589  time_t tEnd = readTimeRec(start, duration);
590  myCS_min = MIN2(myCS_min, tStart);
591  myCS_max = MAX2(myCS_max, tEnd);
592  //std::cout << " start=" << start << " tStart=" << tStart<< " translation=" << asctime(localtime(&tStart)) << "";
593  //std::cout << " duration=" << duration << " tEnd=" << tEnd << " translation=" << asctime(localtime(&tEnd)) << "\n";
594  if (myConstructionTime < tEnd) {
595  NBEdge* edge = myEdgeCont.retrieve(id);
596  if (edge != nullptr) {
597  myRemovedEdges++;
598  myEdgeCont.extract(myDistrictCont, edge, true);
599  }
600  if (myConstructionTime < tStart) {
601  myNotStarted++;
602  } else {
603  myUnderConstruction++;
604  }
605  } else {
606  myFinished++;
607  }
608  } else {
609  WRITE_WARNING(warning);
610  };
611  }
612  return true;
613 }
614 
615 
616 void
618  if (myConstructionEntries > 0) {
619  char buff[1024];
620  std::ostringstream msg;
621  strftime(buff, 1024, "%Y-%m-%d", localtime(&myCS_min));
622  msg << "Parsed " << myConstructionEntries << " construction entries between " << buff;
623  strftime(buff, 1024, "%Y-%m-%d", localtime(&myCS_max));
624  msg << " and " << buff << ".\n";
625  strftime(buff, 1024, "%Y-%m-%d", localtime(&myConstructionTime));
626  msg << "Removed " << myRemovedEdges << " edges not yet constructed at " << buff << ".\n";
627  msg << " not yet started: " << myNotStarted << "\n";
628  msg << " under construction: " << myUnderConstruction << "\n";
629  msg << " finished: " << myFinished << "\n";
630  WRITE_MESSAGE(msg.str());
631  }
632 }
633 
634 
635 int
636 NIImporter_DlrNavteq::readPrefixedInt(const std::string& s, const std::string& prefix, int fallBack) {
637  int result = fallBack;
638  size_t pos = s.find(prefix);
639  if (pos != std::string::npos) {
640  sscanf(s.substr(pos).c_str(), (prefix + "%i").c_str(), &result);
641  }
642  return result;
643 }
644 
645 time_t
646 NIImporter_DlrNavteq::readTimeRec(const std::string& start, const std::string& duration) {
647  // http://www.cplusplus.com/reference/ctime/mktime/
648  struct tm timeinfo;
649  timeinfo.tm_hour = 0;
650  timeinfo.tm_min = 0;
651  timeinfo.tm_sec = 0;
652  timeinfo.tm_year = 0;
653  timeinfo.tm_mon = 0;
654  timeinfo.tm_mday = 1;
655  timeinfo.tm_wday = 0;
656  timeinfo.tm_yday = 0;
657  timeinfo.tm_isdst = 0;
658 
659  timeinfo.tm_year = readPrefixedInt(start, "y") + readPrefixedInt(duration, "y") - 1900;
660  timeinfo.tm_mon = readPrefixedInt(start, "M") + readPrefixedInt(duration, "M") - 1;
661  timeinfo.tm_mday = 7 * (readPrefixedInt(start, "w") + readPrefixedInt(duration, "w"));
662  timeinfo.tm_mday += readPrefixedInt(start, "d") + readPrefixedInt(duration, "d");
663 
664  time_t result = mktime(&timeinfo);
665  return result;
666 }
667 
668 
669 time_t
670 NIImporter_DlrNavteq::readDate(const std::string& yyyymmdd) {
671  struct tm timeinfo;
672  timeinfo.tm_hour = 0;
673  timeinfo.tm_min = 0;
674  timeinfo.tm_sec = 0;
675  timeinfo.tm_wday = 0;
676  timeinfo.tm_yday = 0;
677  timeinfo.tm_isdst = 0;
678 
679  if (yyyymmdd.size() == 10
680  && yyyymmdd[4] == '-'
681  && yyyymmdd[7] == '-') {
682  try {
683  timeinfo.tm_year = StringUtils::toInt(yyyymmdd.substr(0, 4)) - 1900;
684  timeinfo.tm_mon = StringUtils::toInt(yyyymmdd.substr(5, 2)) - 1;
685  timeinfo.tm_mday = StringUtils::toInt(yyyymmdd.substr(8, 2));
686  return mktime(&timeinfo);
687  } catch (...) {
688  }
689  }
690  WRITE_ERROR("Could not parse YYYY-MM-DD date '" + yyyymmdd + "'");
691  time_t now;
692  time(&now);
693  return now;
694 }
695 
696 // ---------------------------------------------------------------------------
697 // definitions of NIImporter_DlrNavteq::ProhibitionHandler-methods
698 // ---------------------------------------------------------------------------
700  NBEdgeCont& ec, const std::string& file, time_t constructionTime) :
701  myEdgeCont(ec),
702  myFile(file),
703  myVersion(0),
704  myConstructionTime(constructionTime) {
705 }
706 
707 
709 
710 
711 bool
713 // # NAME_ID Name
714  if (result[0] == '#') {
715  if (myVersion == 0) {
716  const double version = readVersion(result, myFile);
717  if (version > 0) {
718  myVersion = version;
719  }
720  }
721  return true;
722  }
724  if (st.size() == 1) {
725  return true; // one line with the number of data containing lines in it (also starts with a comment # since ersion 6.5)
726  }
727  if (myVersion >= 6) {
728  assert(st.size() >= 7);
729  const std::string id = st.next();
730  const std::string permanent = st.next();
731  const std::string validityPeriod = st.next();
732  const std::string throughTraffic = st.next();
733  const std::string vehicleType = st.next();
734  if (validityPeriod != UNDEFINED) {
735  WRITE_WARNINGF("Ignoring temporary prohibited manoeuvre (%).", validityPeriod);
736  return true;
737  }
738  }
739  const std::string startEdge = st.next();
740  const std::string endEdge = st.get(st.size() - 1);
741 
742  NBEdge* from = myEdgeCont.retrieve(startEdge);
743  if (from == nullptr) {
744  WRITE_WARNINGF("Ignoring prohibition from unknown start edge '%'.", startEdge);
745  return true;
746  }
747  NBEdge* to = myEdgeCont.retrieve(endEdge);
748  if (to == nullptr) {
749  WRITE_WARNINGF("Ignoring prohibition from unknown end edge '%'.", endEdge);
750  return true;
751  }
752  from->removeFromConnections(to, -1, -1, true);
753  return true;
754 }
755 
756 
757 // ---------------------------------------------------------------------------
758 // definitions of NIImporter_DlrNavteq::ConnectedLanesHandler-methods
759 // ---------------------------------------------------------------------------
761  NBEdgeCont& ec) :
762  myEdgeCont(ec) {
763 }
764 
765 
767 
768 
769 bool
771  if (result[0] == '#') {
772  return true;
773  }
775  if (st.size() == 1) {
776  return true; // one line with the number of data containing lines in it (also starts with a comment # since ersion 6.5)
777  }
778  assert(st.size() >= 7);
779  const std::string nodeID = st.next();
780  const std::string vehicleType = st.next();
781  const std::string fromLaneS = st.next();
782  const std::string toLaneS = st.next();
783  const std::string throughTraffic = st.next();
784  const std::string startEdge = st.next();
785  const std::string endEdge = st.get(st.size() - 1);
786 
787  NBEdge* from = myEdgeCont.retrieve(startEdge);
788  if (from == nullptr) {
789  WRITE_WARNINGF("Ignoring prohibition from unknown start edge '%'.", startEdge);
790  return true;
791  }
792  NBEdge* to = myEdgeCont.retrieve(endEdge);
793  if (to == nullptr) {
794  WRITE_WARNINGF("Ignoring prohibition from unknown end edge '%'.", endEdge);
795  return true;
796  }
797  int fromLane = StringUtils::toInt(fromLaneS) - 1; // one based
798  if (fromLane < 0 || fromLane >= from->getNumLanes()) {
799  WRITE_WARNINGF("Ignoring invalid lane index '%' in connection from edge '%' with % lanes.", fromLaneS, startEdge, from->getNumLanes());
800  return true;
801  }
802  int toLane = StringUtils::toInt(toLaneS) - 1; // one based
803  if (toLane < 0 || toLane >= to->getNumLanes()) {
804  WRITE_WARNINGF("Ignoring invalid lane index '%' in connection to edge '%' with % lanes", toLaneS, endEdge, to->getNumLanes());
805  return true;
806  }
807  if (!from->addLane2LaneConnection(fromLane, to, toLane, NBEdge::L2L_USER, true)) {
808  if (OptionsCont::getOptions().getBool("show-errors.connections-first-try")) {
809  WRITE_WARNINGF("Could not set loaded connection from '%' to '%'.", from->getLaneID(fromLane), to->getLaneID(toLane));
810  }
811  // set as to be re-applied after network processing
812  // if this connection runs across a node cluster it may not be possible to set this
813  const bool warnOnly = st.size() > 7;
814  myEdgeCont.addPostProcessConnection(from->getID(), fromLane, to->getID(), toLane, false, true,
817  }
818  // ensure that connections for other lanes are guessed if not specified
820  from->getLaneStruct(fromLane).connectionsDone = true;
821  return true;
822 }
823 
824 
825 /****************************************************************************/
NIImporter_DlrNavteq::TimeRestrictionsHandler::TimeRestrictionsHandler
TimeRestrictionsHandler(NBEdgeCont &ec, NBDistrictCont &dc, time_t constructionTime)
Constructor.
Definition: NIImporter_DlrNavteq.cpp:544
OptionsCont::isSet
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
Definition: OptionsCont.cpp:135
UNUSED_PARAMETER
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:31
NBEdge::UNSPECIFIED_OFFSET
static const double UNSPECIFIED_OFFSET
unspecified lane offset
Definition: NBEdge.h:318
NIImporter_DlrNavteq::readPrefixedInt
static int readPrefixedInt(const std::string &s, const std::string &prefix, int fallBack=0)
Definition: NIImporter_DlrNavteq.cpp:636
ToString.h
MIN2
T MIN2(T a, T b)
Definition: StdDefs.h:73
NIImporter_DlrNavteq::TimeRestrictionsHandler::~TimeRestrictionsHandler
~TimeRestrictionsHandler()
Destructor.
Definition: NIImporter_DlrNavteq.cpp:558
LineReader.h
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
NBNetBuilder
Instance responsible for building networks.
Definition: NBNetBuilder.h:109
NBTrafficLightLogicCont
A container for traffic light definitions and built programs.
Definition: NBTrafficLightLogicCont.h:57
NBEdge::declareConnectionsAsLoaded
void declareConnectionsAsLoaded(EdgeBuildingStep step=EdgeBuildingStep::LANES2LANES_USER)
declares connections as fully loaded. This is needed to avoid recomputing connections if an edge has ...
Definition: NBEdge.h:1301
NIImporter_DlrNavteq.h
OptionsCont.h
StringUtils::toDouble
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
Definition: StringUtils.cpp:345
NIImporter_DlrNavteq::NamesHandler::report
bool report(const std::string &result)
Parsing method.
Definition: NIImporter_DlrNavteq.cpp:522
NIImporter_DlrNavteq::readDate
static time_t readDate(const std::string &yyyymmdd)
Definition: NIImporter_DlrNavteq.cpp:670
MsgHandler.h
NIImporter_DlrNavteq::NamesHandler
Importer of street names in DLRNavteq's (aka elmar) format.
Definition: NIImporter_DlrNavteq.h:311
NIImporter_DlrNavteq::NodesHandler
Importer of nodes stored in unsplit elmar format.
Definition: NIImporter_DlrNavteq.h:84
NINavTeqHelper::addVehicleClasses
static void addVehicleClasses(NBEdge &e, const std::string &classS)
Adds vehicle classes parsing the given list of allowed vehicles.
Definition: NINavTeqHelper.cpp:99
NIImporter_DlrNavteq::NamesHandler::NamesHandler
NamesHandler(const std::string &file, std::map< std::string, std::string > &streetNames)
Constructor.
Definition: NIImporter_DlrNavteq.cpp:511
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
LineReader::setFile
bool setFile(const std::string &file)
Reinitialises the reader for reading from the given file.
Definition: LineReader.cpp:177
TrafficLightType
TrafficLightType
Definition: SUMOXMLDefinitions.h:1197
StringUtils::to_lower_case
static std::string to_lower_case(std::string str)
Transfers the content to lower case.
Definition: StringUtils.cpp:59
NBEdgeCont.h
NIImporter_DlrNavteq::TrafficlightsHandler::~TrafficlightsHandler
~TrafficlightsHandler()
Destructor.
Definition: NIImporter_DlrNavteq.cpp:474
GeoConvHelper.h
NIImporter_DlrNavteq::TimeRestrictionsHandler
Importer of street names in DLRNavteq's (aka elmar) format.
Definition: NIImporter_DlrNavteq.h:359
NIImporter_DlrNavteq::EdgesHandler
Importer of edges stored in unsplit elmar format.
Definition: NIImporter_DlrNavteq.h:139
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
NBOwnTLDef
A traffic light logics which must be computed (only nodes/edges are given)
Definition: NBOwnTLDef.h:46
OptionsCont::getOptions
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:57
NBNode::getType
SumoXMLNodeType getType() const
Returns the type of this node.
Definition: NBNode.h:272
StringTokenizer::next
std::string next()
returns the next substring when it exists. Otherwise the behaviour is undefined
Definition: StringTokenizer.cpp:99
NIImporter_DlrNavteq::TrafficlightsHandler::TrafficlightsHandler
TrafficlightsHandler(NBNodeCont &nc, NBTrafficLightLogicCont &tlc, NBEdgeCont &ne, const std::string &file)
Constructor.
Definition: NIImporter_DlrNavteq.cpp:463
NBNetBuilder::transformCoordinate
static bool transformCoordinate(Position &from, bool includeInBoundary=true, GeoConvHelper *from_srs=0)
transforms loaded coordinates handles projections, offsets (using GeoConvHelper) and import of height...
Definition: NBNetBuilder.cpp:633
NIImporter_DlrNavteq::EdgesHandler::getColumn
std::string getColumn(const StringTokenizer &st, ColumnName name, const std::string fallback="")
Definition: NIImporter_DlrNavteq.cpp:416
WRITE_WARNINGF
#define WRITE_WARNINGF(...)
Definition: MsgHandler.h:276
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
NBEdge::getPermissions
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
Definition: NBEdge.cpp:3404
StringTokenizer::WHITECHARS
static const int WHITECHARS
identifier for splitting the given string at all whitespace characters
Definition: StringTokenizer.h:67
NBEdge::L2L_USER
@ L2L_USER
The connection was given by the user.
Definition: NBEdge.h:133
PositionVector
A list of positions.
Definition: PositionVector.h:45
NBDistrictCont
A container for districts.
Definition: NBDistrictCont.h:52
LANESPREAD_CENTER
@ LANESPREAD_CENTER
Definition: SUMOXMLDefinitions.h:1099
NIImporter_DlrNavteq::EdgesHandler::~EdgesHandler
~EdgesHandler()
Destructor.
Definition: NIImporter_DlrNavteq.cpp:263
NIImporter_DlrNavteq::ProhibitionHandler::~ProhibitionHandler
~ProhibitionHandler()
Destructor.
Definition: NIImporter_DlrNavteq.cpp:708
NBNodeCont
Container for nodes during the netbuilding process.
Definition: NBNodeCont.h:59
NBNetBuilder::getEdgeCont
NBEdgeCont & getEdgeCont()
Definition: NBNetBuilder.h:150
NBEdge::disallowVehicleClass
void disallowVehicleClass(int lane, SUMOVehicleClass vclass)
set disallowed class for the given lane or for all lanes if -1 is given
Definition: NBEdge.cpp:3213
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:91
NIImporter_DlrNavteq::EdgesHandler::EdgesHandler
EdgesHandler(NBNodeCont &nc, NBEdgeCont &ec, NBTypeCont &tc, const std::string &file, std::map< std::string, PositionVector > &geoms, std::map< std::string, std::string > &streetNames)
Constructor.
Definition: NIImporter_DlrNavteq.cpp:249
MAX2
T MAX2(T a, T b)
Definition: StdDefs.h:79
NINavTeqHelper::addVehicleClassesV6
static void addVehicleClassesV6(NBEdge &e, const std::string &classS)
same as addVehicleClasses but for version 6+
Definition: NINavTeqHelper.cpp:152
NIImporter_DlrNavteq::ConnectedLanesHandler::~ConnectedLanesHandler
~ConnectedLanesHandler()
Destructor.
Definition: NIImporter_DlrNavteq.cpp:766
NBNode::getPosition
const Position & getPosition() const
Definition: NBNode.h:247
StringTokenizer::get
std::string get(int pos) const
returns the item at the given position
Definition: StringTokenizer.cpp:124
NumberFormatException
Definition: UtilExceptions.h:95
NBEdge::getToNode
NBNode * getToNode() const
Returns the destination node of the edge.
Definition: NBEdge.h:498
NIImporter_DlrNavteq::ConnectedLanesHandler
Imports prohibitions regarding connectivity.
Definition: NIImporter_DlrNavteq.h:471
NBEdge::UNSPECIFIED_CONTPOS
static const double UNSPECIFIED_CONTPOS
unspecified internal junction position
Definition: NBEdge.h:324
NBEdge::getLaneID
std::string getLaneID(int lane) const
get lane ID
Definition: NBEdge.cpp:3093
StringBijection::get
T get(const std::string &str) const
Definition: StringBijection.h:97
StringTokenizer
Definition: StringTokenizer.h:61
NBTypeCont.h
NIImporter_DlrNavteq::EdgesHandler::MISSING_COLUMN
static const int MISSING_COLUMN
Definition: NIImporter_DlrNavteq.h:200
SVC_PASSENGER
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
Definition: SUMOVehicleClass.h:159
NINavTeqHelper.h
NBEdge::getNumLanes
int getNumLanes() const
Returns the number of lanes.
Definition: NBEdge.h:477
NINavTeqHelper::getLaneNumber
static int getLaneNumber(const std::string &id, const std::string &laneNoS, double speed)
Returns the lane number evaluating the given Navteq-description.
Definition: NINavTeqHelper.cpp:69
NBNetBuilder.h
ProcessError
Definition: UtilExceptions.h:39
NIImporter_DlrNavteq::TrafficlightsHandler::report
bool report(const std::string &result)
Parsing method.
Definition: NIImporter_DlrNavteq.cpp:478
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
NIImporter_DlrNavteq::ConnectedLanesHandler::ConnectedLanesHandler
ConnectedLanesHandler(NBEdgeCont &ne)
Constructor.
Definition: NIImporter_DlrNavteq.cpp:760
NIImporter_DlrNavteq::NodesHandler::NodesHandler
NodesHandler(NBNodeCont &nc, const std::string &file, std::map< std::string, PositionVector > &geoms)
Constructor.
Definition: NIImporter_DlrNavteq.cpp:176
UtilExceptions.h
OptionsCont
A storage for options typed value containers)
Definition: OptionsCont.h:89
PositionVector::EMPTY
static const PositionVector EMPTY
empty Vector
Definition: PositionVector.h:73
NIImporter_DlrNavteq::ProhibitionHandler
Imports prohibitions regarding connectivity.
Definition: NIImporter_DlrNavteq.h:420
NBEdge::getLaneStruct
Lane & getLaneStruct(int lane)
Definition: NBEdge.h:1287
NBEdge::UNSPECIFIED_VISIBILITY_DISTANCE
static const double UNSPECIFIED_VISIBILITY_DISTANCE
unspecified foe visibility for connections
Definition: NBEdge.h:327
NIImporter_DlrNavteq::GEO_SCALE
static const std::string GEO_SCALE
scaling factor for geo coordinates (DLRNavteq format uses this to increase floating point precisions)
Definition: NIImporter_DlrNavteq.h:70
NBEdge::UNSPECIFIED_SPEED
static const double UNSPECIFIED_SPEED
unspecified lane speed
Definition: NBEdge.h:321
LineReader
Retrieves a file linewise and reports the lines to a handler.
Definition: LineReader.h:50
SVC_SHIP
@ SVC_SHIP
is an arbitrary ship
Definition: SUMOVehicleClass.h:195
NBEdge::removeFromConnections
void removeFromConnections(NBEdge *toEdge, int fromLane=-1, int toLane=-1, bool tryLater=false, const bool adaptToLaneRemoval=false, const bool keepPossibleTurns=false)
Removes the specified connection(s)
Definition: NBEdge.cpp:1266
StringTokenizer::size
int size() const
returns the number of existing substrings
Definition: StringTokenizer.cpp:137
NIImporter_DlrNavteq::ProhibitionHandler::ProhibitionHandler
ProhibitionHandler(NBEdgeCont &ne, const std::string &file, time_t constructionTime)
Constructor.
Definition: NIImporter_DlrNavteq.cpp:699
LineHandler.h
NIImporter_DlrNavteq::ProhibitionHandler::report
bool report(const std::string &result)
Parsing method.
Definition: NIImporter_DlrNavteq.cpp:712
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
NIImporter_DlrNavteq::readTimeRec
static time_t readTimeRec(const std::string &start, const std::string &duration)
Definition: NIImporter_DlrNavteq.cpp:646
NIImporter_DlrNavteq::loadNetwork
static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Loads content of the optionally given dlr-navteq (aka Elmar-fomat) folder.
Definition: NIImporter_DlrNavteq.cpp:64
NBNodeCont.h
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
StringUtils.h
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
StringTokenizer::TAB
static const int TAB
the ascii index of the tab character
Definition: StringTokenizer.h:73
NILoader.h
PROGRESS_BEGIN_MESSAGE
#define PROGRESS_BEGIN_MESSAGE(msg)
Definition: MsgHandler.h:278
NIImporter_DlrNavteq::TimeRestrictionsHandler::printSummary
void printSummary()
Definition: NIImporter_DlrNavteq.cpp:617
NIImporter_DlrNavteq::ConnectedLanesHandler::report
bool report(const std::string &result)
Parsing method.
Definition: NIImporter_DlrNavteq.cpp:770
NIImporter_DlrNavteq::EdgesHandler::getStreetNameFromIDs
std::string getStreetNameFromIDs(const std::string &regionalID, const std::string &localID) const
build the street name for the given ids
Definition: NIImporter_DlrNavteq.cpp:443
NBTypeCont
A storage for available types of edges.
Definition: NBTypeCont.h:54
PositionVector::reverse
PositionVector reverse() const
reverse position vector
Definition: PositionVector.cpp:1086
NBNetBuilder::getTLLogicCont
NBTrafficLightLogicCont & getTLLogicCont()
Returns a reference to the traffic light logics container.
Definition: NBNetBuilder.h:165
NIImporter_DlrNavteq::EdgesHandler::report
bool report(const std::string &result)
Parsing method.
Definition: NIImporter_DlrNavteq.cpp:267
NIImporter_DlrNavteq::readVersion
static double readVersion(const std::string &line, const std::string &file)
Definition: NIImporter_DlrNavteq.cpp:152
SVCAll
const SVCPermissions SVCAll
all VClasses are allowed
Definition: SUMOVehicleClass.cpp:146
PROGRESS_DONE_MESSAGE
#define PROGRESS_DONE_MESSAGE()
Definition: MsgHandler.h:279
NBEdgeCont::recheckLaneSpread
void recheckLaneSpread()
Rechecks whether the lane spread is proper.
Definition: NBEdgeCont.cpp:1024
NBNetBuilder::getDistrictCont
NBDistrictCont & getDistrictCont()
Returns a reference the districts container.
Definition: NBNetBuilder.h:170
NBEdge::UNSPECIFIED_WIDTH
static const double UNSPECIFIED_WIDTH
unspecified lane width
Definition: NBEdge.h:315
NIImporter_DlrNavteq::TimeRestrictionsHandler::report
bool report(const std::string &result)
Parsing method.
Definition: NIImporter_DlrNavteq.cpp:562
SUMOXMLDefinitions::TrafficLightTypes
static StringBijection< TrafficLightType > TrafficLightTypes
traffic light types
Definition: SUMOXMLDefinitions.h:1392
NIImporter_DlrNavteq::NodesHandler::report
bool report(const std::string &result)
Parsing method.
Definition: NIImporter_DlrNavteq.cpp:188
NIImporter_DlrNavteq::EdgesHandler::ColumnName
ColumnName
Definition: NIImporter_DlrNavteq.h:202
config.h
StringTokenizer.h
NIImporter_DlrNavteq::NodesHandler::~NodesHandler
~NodesHandler()
Destructor.
Definition: NIImporter_DlrNavteq.cpp:184
NBNode
Represents a single node (junction) during network building.
Definition: NBNode.h:67
NBOwnTLDef.h
NBNetBuilder::getNodeCont
NBNodeCont & getNodeCont()
Returns a reference to the node container.
Definition: NBNetBuilder.h:155
NBNetBuilder::getTypeCont
NBTypeCont & getTypeCont()
Returns a reference to the type container.
Definition: NBNetBuilder.h:160
NBNode.h
Named::getID
const std::string & getID() const
Returns the id.
Definition: Named.h:76
WRITE_ERROR
#define WRITE_ERROR(msg)
Definition: MsgHandler.h:283
NBEdge::addLane2LaneConnection
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, SVCPermissions=SVC_UNSPECIFIED)
Adds a connection between the specified this edge's lane and an approached one.
Definition: NBEdge.cpp:984
WRITE_MESSAGE
#define WRITE_MESSAGE(msg)
Definition: MsgHandler.h:277
LineReader::readAll
void readAll(LineHandler &lh)
Reads the whole file linewise, reporting every line to the given LineHandler.
Definition: LineReader.cpp:58
NIImporter_DlrNavteq::TrafficlightsHandler
Importer of traffic lights stored in DLRNavteq's (aka elmar) format.
Definition: NIImporter_DlrNavteq.h:255
NBNode::reinit
void reinit(const Position &position, SumoXMLNodeType type, bool updateEdgeGeometries=false)
Resets initial values.
Definition: NBNode.cpp:303
NBTrafficLightDefinition
The base class for traffic light logic definitions.
Definition: NBTrafficLightDefinition.h:67
NIImporter_DlrNavteq::UNDEFINED
static const std::string UNDEFINED
magic value for undefined stuff
Definition: NIImporter_DlrNavteq.h:73
NBEdge::Lane::connectionsDone
bool connectionsDone
Whether connection information for this lane is already completed.
Definition: NBEdge.h:176
NBEdge.h
NIImporter_DlrNavteq::NamesHandler::~NamesHandler
~NamesHandler()
Destructor.
Definition: NIImporter_DlrNavteq.cpp:518
NBEdge::EdgeBuildingStep::INIT
@ INIT
The edge has been loaded, nothing is computed yet.
NBEdge::getID
const std::string & getID() const
Definition: NBEdge.h:1380
NODETYPE_TRAFFIC_LIGHT
@ NODETYPE_TRAFFIC_LIGHT
Definition: SUMOXMLDefinitions.h:1056
NINavTeqHelper::getSpeed
static double getSpeed(const std::string &id, const std::string &speedClassS)
Returns the speed evaluating the given Navteq-description.
Definition: NINavTeqHelper.cpp:37