40 {
"VSYS", VISUM_SYS },
41 {
"STRECKENTYP", VISUM_LINKTYPE },
42 {
"KNOTEN", VISUM_NODE },
43 {
"BEZIRK", VISUM_DISTRICT },
44 {
"PUNKT", VISUM_POINT },
45 {
"STRECKE", VISUM_LINK },
47 {
"VSYSSET", VISUM_TYPES },
48 {
"RANG", VISUM_RANK },
49 {
"KAPIV", VISUM_CAPACITY },
50 {
"XKOORD", VISUM_XCOORD },
51 {
"YKOORD", VISUM_YCOORD },
53 {
"CODE", VISUM_CODE },
54 {
"VONKNOTNR", VISUM_FROMNODE },
55 {
"NACHKNOTNR", VISUM_TONODE },
56 {
"TYPNR", VISUM_TYPE },
58 {
"ANBINDUNG", VISUM_DISTRICT_CONNECTION },
59 {
"BEZNR", VISUM_SOURCE_DISTRICT },
60 {
"KNOTNR", VISUM_FROMNODENO },
61 {
"RICHTUNG", VISUM_DIRECTION },
62 {
"FLAECHEID", VISUM_SURFACEID },
63 {
"TFLAECHEID", VISUM_FACEID },
64 {
"VONPUNKTID", VISUM_FROMPOINTID },
65 {
"NACHPUNKTID", VISUM_TOPOINTID },
66 {
"KANTE", VISUM_EDGE },
67 {
"ABBIEGER", VISUM_TURN },
68 {
"UEBERKNOTNR", VISUM_VIANODENO },
69 {
"ANZFAHRSTREIFEN", VISUM_NUMLANES },
70 {
"INDEX", VISUM_INDEX },
71 {
"STRECKENPOLY", VISUM_LINKPOLY },
72 {
"FLAECHENELEMENT", VISUM_SURFACEITEM },
73 {
"TEILFLAECHENELEMENT", VISUM_FACEITEM },
74 {
"KANTEID", VISUM_EDGEID },
75 {
"Q", VISUM_ORIGIN },
76 {
"Z", VISUM_DESTINATION },
93 if (!oc.
isSet(
"visum-file")) {
99 oc.
getBool(
"visum.use-type-priority"),
110 const std::string& file,
113 const std::string& languageFile) :
114 myNetBuilder(nb), myFileName(file),
115 myCapacity2Lanes(capacity2Lanes), myUseVisumPrio(useVisumPrio) {
116 if (languageFile !=
"") {
176 for (NIVisumTL_Map::iterator j =
myTLS.begin(); j !=
myTLS.end(); j++) {
201 if (line.length() > 0 && line[0] ==
'$') {
202 ParserVector::iterator i;
204 std::string dataName =
"$" + (*i).name +
":";
205 if (line.substr(0, dataName.length()) == dataName) {
207 (*i).pattern = line.substr(dataName.length());
215 if ((*i).position < 0) {
227 bool singleDataEndFound =
false;
230 if (line.length() == 0 || line[0] ==
'*' || line[0] ==
'$') {
231 singleDataEndFound =
true;
236 (this->*(*i).function)();
238 WRITE_ERROR(
"Too short value line in " + (*i).name +
" occurred.");
242 WRITE_ERROR(
"One of the needed values ('" + std::string(e.what()) +
"') is missing in " + (*i).name +
".");
252 for (NIVisumTL_Map::iterator j =
myTLS.begin(); j !=
myTLS.end(); j++) {
257 (*k).first->addShape((*k).second);
282 }
else if (speed < 0) {
292 myNetBuilder.
getTypeCont().
insertEdgeType(
myCurrentID, numLanes, speed / (
double) 3.6, priority, permissions,
NBEdge::UNSPECIFIED_WIDTH,
false,
NBEdge::UNSPECIFIED_WIDTH,
NBEdge::UNSPECIFIED_WIDTH, 0, 0, 0);
385 if (speedS.find(
"km/h") != std::string::npos) {
386 speedS = speedS.substr(0, speedS.find(
"km/h"));
418 bool oneway_checked = oneway;
420 if (previous !=
nullptr) {
423 oneway_checked =
false;
426 oneway_checked =
false;
431 if (previous !=
nullptr) {
434 oneway_checked =
false;
439 if (nolanes != 0 && speed != 0) {
457 if (nolanes != 0 && speed != 0) {
477 myEdges[id] = std::make_pair(from, to);
498 if (dest ==
nullptr) {
508 if (dir.length() == 0) {
533 if (dest ==
nullptr) {
553 std::string
id = bez +
"-" + dest->
getID();
556 if (dir.length() == 0) {
562 bool hasContinuation =
false;
563 for (EdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) {
564 if (!(*i)->isMacroscopicConnector()) {
565 hasContinuation =
true;
568 if (!hasContinuation) {
570 WRITE_WARNING(
"Incoming connector '" +
id +
"' will not be build - would be not connected to network.");
573 if (src ==
nullptr) {
574 WRITE_ERROR(
"The district '" + bez +
"' could not be built.");
577 NBEdge* edge =
new NBEdge(
id, src, dest,
"VisumConnector",
584 WRITE_ERROR(
"A duplicate edge id occurred (ID='" +
id +
"').");
588 if (edge !=
nullptr) {
596 bool hasPredeccessor =
false;
597 for (EdgeVector::const_iterator i = edges.begin(); i != edges.end(); ++i) {
598 if (!(*i)->isMacroscopicConnector()) {
599 hasPredeccessor =
true;
602 if (!hasPredeccessor) {
604 WRITE_WARNING(
"Outgoing connector '" +
id +
"' will not be build - would be not connected to network.");
607 if (src ==
nullptr) {
608 WRITE_ERROR(
"The district '" + bez +
"' could not be built.");
612 NBEdge* edge =
new NBEdge(
id, dest, src,
"VisumConnector",
619 WRITE_ERROR(
"A duplicate edge id occurred (ID='" +
id +
"').");
623 if (edge !=
nullptr) {
641 if (from ==
nullptr || via ==
nullptr || to ==
nullptr) {
653 if (src ==
nullptr) {
659 if (dest ==
nullptr) {
688 WRITE_ERROR(
"Error in geometry description from node '" + from->
getID() +
"' to node '" + to->
getID() +
"'.");
693 WRITE_ERROR(
"Unable to project coordinates for node '" + from->
getID() +
"'.");
724 if (baseEdge ==
nullptr) {
730 if (node ==
nullptr) {
736 if (edge ==
nullptr) {
747 WRITE_ERROR(
"A lane number for edge '" + edge->
getID() +
"' is not numeric (" + laneS +
").");
752 WRITE_ERROR(
"A lane number for edge '" + edge->
getID() +
"' is not positive (" + laneS +
").");
771 WRITE_ERROR(
"A lane length for edge '" + edge->
getID() +
"' is not numeric (" + lengthS +
").");
775 WRITE_ERROR(
"A lane length for edge '" + edge->
getID() +
"' is not positive (" + lengthS +
").");
805 bool mustRecheck =
true;
806 double seenLength = 0;
807 while (mustRecheck) {
810 std::string sub = edge->
getID();
811 sub = sub.substr(sub.rfind(
'_', sub.rfind(
'_') - 1));
812 sub = sub.substr(1, sub.find(
'_', 1) - 1);
833 double useLength = length - seenLength;
834 useLength = edge->
getLength() - useLength;
835 if (useLength < 0 || useLength > edge->
getLength()) {
839 std::string edgeID = edge->
getID();
842 edgeID = edgeID.substr(0, edgeID.find(
'_'));
848 std::string nid = edgeID +
"_" +
toString((
int) length) +
"_" + node->
getID();
888 auto tlIt =
myTLS.find(trafficLight);
889 if (n !=
nullptr && tlIt !=
myTLS.end()) {
890 tlIt->second->addNode(n);
892 WRITE_ERROR(
"Could not assign" + std::string(n ==
nullptr ?
" missing" :
"") +
" node '" + node
893 +
"' to" + std::string(tlIt ==
myTLS.end() ?
" missing" :
"") +
" traffic light '" + trafficLight +
"'");
907 WRITE_ERROR(
"Could not find TLS '" + LSAid +
"' for setting the signal group.");
910 myTLS.find(LSAid)->second->addSignalGroup(
myCurrentID, startTime, endTime, yellowTime);
920 WRITE_WARNING(
"Ignoring SIGNALGRUPPEZUFSABBIEGER because LsaNr is not known");
933 if (from ==
nullptr && to ==
nullptr) {
942 if (edg1 !=
nullptr && edg2 !=
nullptr) {
945 if (edg1->
getID()[0] ==
'-') {
946 sid = edg1->
getID().substr(1);
948 sid =
"-" + edg1->
getID();
950 if (sid.find(
'_') != std::string::npos) {
951 sid = sid.substr(0, sid.find(
'_'));
957 if (edg2->
getID()[0] ==
'-') {
958 sid = edg2->
getID().substr(1);
960 sid =
"-" + edg2->
getID();
962 if (sid.find(
'_') != std::string::npos) {
963 sid = sid.substr(0, sid.find(
'_'));
977 WRITE_ERROR(
"Unknown edge in TEILFLAECHENELEMENT");
993 if (dir.length() > 0 && dir[0] ==
'1') {
1001 const std::vector<long long int>& areas =
mySubPartsAreas.find(
id)->second;
1002 for (std::vector<long long int>::const_iterator i = areas.begin(); i != areas.end(); ++i) {
1010 if (dir.length() > 0 && dir[0] ==
'1') {
1029 myTLS.find(LSAid)->second->addPhase(phaseid, startTime, endTime, yellowTime);
1042 SG.
phases()[Phaseid] = PH;
1048 NBEdge* fromEdge =
nullptr;
1049 NBEdge* toEdge =
nullptr;
1052 if (nodeID ==
"0") {
1055 if (fromEdge ==
nullptr) {
1059 WRITE_WARNING(
"Ignoring lane-to-lane connection (not yet implemented for this format version)");
1063 if (node ==
nullptr) {
1069 if (fromEdge ==
nullptr || toEdge ==
nullptr) {
1073 int fromLaneOffset = 0;
1083 int toLaneOffset = 0;
1097 WRITE_ERROR(
"A from-lane number for edge '" + fromEdge->
getID() +
"' is not numeric (" + fromLaneS +
").");
1102 WRITE_ERROR(
"A from-lane number for edge '" + fromEdge->
getID() +
"' is not positive (" + fromLaneS +
").");
1111 WRITE_ERROR(
"A to-lane number for edge '" + toEdge->
getID() +
"' is not numeric (" + toLaneS +
").");
1116 WRITE_ERROR(
"A to-lane number for edge '" + toEdge->
getID() +
"' is not positive (" + toLaneS +
").");
1120 if (fromLane - fromLaneOffset < 0) {
1123 fromLane = (int)fromEdge->
getNumLanes() - (fromLane - fromLaneOffset) - 1;
1125 if (toLane - toLaneOffset < 0) {
1128 toLane = (int)toEdge->
getNumLanes() - (toLane - toLaneOffset) - 1;
1132 WRITE_ERROR(
"A from-lane number for edge '" + fromEdge->
getID() +
"' is larger than the edge's lane number (" + fromLaneS +
").");
1136 WRITE_ERROR(
"A to-lane number for edge '" + toEdge->
getID() +
"' is larger than the edge's lane number (" + toLaneS +
").");
1159 if (val.find(suffix) != std::string::npos) {
1160 val = val.substr(0, val.find(suffix));
1195 std::transform(v.begin(), v.end(), v.begin(), tolower);
1196 if (v ==
"bus" || v ==
"tcsp" || v ==
"acces tc" || v ==
"Accès tc" || v ==
"accès tc") {
1198 }
else if (v ==
"walk" || v ==
"w" || v ==
"f" || v ==
"ped" || v ==
"map") {
1200 }
else if (v ==
"l" || v ==
"lkw" || v ==
"h" || v ==
"hgv" || v ==
"lw" || v ==
"truck" || v ==
"tru" || v ==
"pl") {
1202 }
else if (v ==
"b" || v ==
"bike" || v ==
"velo") {
1204 }
else if (v ==
"train" || v ==
"rail") {
1206 }
else if (v ==
"tram") {
1208 }
else if (v ==
"p" || v ==
"pkw" || v ==
"car" || v ==
"c" || v ==
"vp" || v ==
"2rm") {
1224 if (node ==
nullptr) {
1225 WRITE_ERROR(
"The node '" + nodeS +
"' is not known.");
1234 if (node ==
nullptr) {
1255 if (edge ==
nullptr) {
1256 WRITE_ERROR(
"The edge '" + edgeS +
"' is not known.");
1276 if (edge->
getID()[0] ==
'-') {
1277 sid = edge->
getID().substr(1);
1279 sid =
"-" + edge->
getID();
1281 if (sid.find(
'_') != std::string::npos) {
1282 sid = sid.substr(0, sid.find(
'_'));
1290 if (begin ==
nullptr) {
1294 std::string edgeID = ret->
getID();
1296 while (ret !=
nullptr) {
1302 if (nedges.size() != 1) {
1307 NBEdge* next = nedges[0];
1308 if (ret->
getID().substr(0, edgeID.length()) != next->
getID().substr(0, edgeID.length())) {
1322 while (ret !=
nullptr) {
1328 if (nedges.size() != 1) {
1333 NBEdge* next = nedges[0];
1334 if (ret->
getID().substr(0, edgeID.length()) != next->
getID().substr(0, edgeID.length())) {
1353 if (edge ==
nullptr) {
1354 WRITE_ERROR(
"The edge '" + edgeS +
"' is not known.");
1373 EdgeVector::const_iterator i;
1375 if (ToNode == (*i)->getToNode()) {
1388 value = value.substr(0, value.length() - 4);
1399 return defaultValue;
1416 double defaultValue) {
1433 const std::string& fieldName2) {
1451 if (dist ==
nullptr) {
1456 nid =
id +
"-" + dest->
getID();
1462 WRITE_ERROR(
"Could not build connector node '" + nid +
"'.");
1471 if (from ==
nullptr) {
1472 WRITE_ERROR(
" The from-node was not found within the net");
1474 if (to ==
nullptr) {
1475 WRITE_ERROR(
" The to-node was not found within the net");
1480 return from !=
nullptr && to !=
nullptr && from != to;
1485 return (edge->
getID().length() > node->
getID().length() + 1
1486 && (edge->
getID().substr(edge->
getID().length() - node->
getID().length() - 1) ==
"_" + node->
getID()));
1491 std::ifstream strm(file.c_str());
1493 throw ProcessError(
"Could not load VISUM language map from '" + file +
"'.");
1495 while (strm.good()) {
1504 }
else if (keyDE !=
"") {
1505 WRITE_WARNING(
"Unknown entry '" + keyDE +
"' in VISUM language map");
#define WRITE_MESSAGE(msg)
#define WRITE_WARNING(msg)
#define PROGRESS_DONE_MESSAGE()
#define PROGRESS_BEGIN_MESSAGE(msg)
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
@ SVC_TRUCK
vehicle is a large transport vehicle
@ SVC_RAIL
vehicle is a not electrified rail
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_TRAM
vehicle is a light rail
@ SVC_BUS
vehicle is a bus
@ SVC_PEDESTRIAN
pedestrian
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge's lateral offset shal...
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void setPos(unsigned long pos)
Sets the current position within the file to the given value.
unsigned long getPosition()
Returns the current position within the file.
bool readLine(LineHandler &lh)
Reads a single (the next) line from the file and reports it to the given LineHandler.
bool setFile(const std::string &file)
Reinitialises the reader for reading from the given file.
void reinit()
Reinitialises the reading (of the previous file)
bool hasMore() const
Returns whether another line may be read (the file was not read completely)
A helper class which computes the lane number from given capacity.
int get(double capacity) const
Returns the number of lanes computed from the given capacity.
NBDistrict * retrieve(const std::string &id) const
Returns the districts with the given id.
bool addSink(const std::string &dist, NBEdge *const destination, double weight)
Adds a sink to the named district.
bool insert(NBDistrict *const district)
Adds a district to the dictionary.
bool addSource(const std::string &dist, NBEdge *const source, double weight)
Adds a source to the named district.
A class representing a single district.
const Position & getPosition() const
Returns the position of this district's center.
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
void reduceGeometries(const double minDist)
bool insert(NBEdge *edge, bool ignorePrunning=false)
Adds an edge to the dictionary.
bool splitAt(NBDistrictCont &dc, NBEdge *edge, NBNode *node)
Splits the edge at the position nearest to the given node.
The representation of a single edge during network building.
void addGeometryPoint(int index, const Position &p)
Adds a further geometry point.
bool addEdge2EdgeConnection(NBEdge *dest, bool overrideRemoval=false)
Adds a connection to another edge.
double getLength() const
Returns the computed length of the edge.
void setPermissions(SVCPermissions permissions, int lane=-1)
set allowed/disallowed classes for the given lane or for all lanes if -1 is given
void incLaneNo(int by)
increment lane
const std::string & getID() const
NBNode * getToNode() const
Returns the destination node of the edge.
void setLaneSpreadFunction(LaneSpreadFunction spread)
(Re)sets how the lanes lateral offset shall be computed
int getNumLanes() const
Returns the number of lanes.
const PositionVector & getGeometry() const
Returns the geometry of the edge.
@ VALIDATED
The connection was computed and validated.
static const double UNSPECIFIED_WIDTH
unspecified lane width
static const double UNSPECIFIED_OFFSET
unspecified lane offset
bool addLane2LaneConnection(int fromLane, NBEdge *dest, int toLane, Lane2LaneInfoType type, bool mayUseSameDestination=false, bool mayDefinitelyPass=false, KeepClear keepClear=KEEPCLEAR_UNSPECIFIED, double contPos=UNSPECIFIED_CONTPOS, double visibility=UNSPECIFIED_VISIBILITY_DISTANCE, double speed=UNSPECIFIED_SPEED, double length=myDefaultConnectionLength, const PositionVector &customShape=PositionVector::EMPTY, const bool uncontrolled=UNSPECIFIED_CONNECTION_UNCONTROLLED, SVCPermissions=SVC_UNSPECIFIED, bool postProcess=false)
Adds a connection between the specified this edge's lane and an approached one.
void setAsMacroscopicConnector()
NBNode * getFromNode() const
Returns the origin node of the edge.
static std::string normalIDRepresentation(const std::string &id)
converts the numerical id to its "normal" string representation
Instance responsible for building networks.
NBDistrictCont & getDistrictCont()
Returns a reference the districts container.
NBTypeCont & getTypeCont()
Returns a reference to the type container.
static bool transformCoordinate(Position &from, bool includeInBoundary=true, GeoConvHelper *from_srs=0)
transforms loaded coordinates handles projections, offsets (using GeoConvHelper) and import of height...
NBEdgeCont & getEdgeCont()
NBNodeCont & getNodeCont()
Returns a reference to the node container.
NBTrafficLightLogicCont & getTLLogicCont()
Returns a reference to the traffic light logics container.
bool insert(const std::string &id, const Position &position, NBDistrict *district=0)
Inserts a node into the map.
NBNode * retrieve(const std::string &id) const
Returns the node with the given name.
Represents a single node (junction) during network building.
bool hasIncoming(const NBEdge *const e) const
Returns whether the given edge ends at this node.
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges (The edges which start at this node)
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges (The edges which yield in this node)
bool hasOutgoing(const NBEdge *const e) const
Returns whether the given edge starts at this node.
NBEdge * getConnectionTo(NBNode *n) const
get connection to certain node
bool markEdgeTypeAsSet(const std::string &id, const SumoXMLAttr attr)
Marks an attribute of a edgeType as set.
double getEdgeTypeSpeed(const std::string &edgeType) const
Returns the maximal velocity for the given edgeType [m/s].
int getEdgeTypePriority(const std::string &edgeType) const
Returns the priority for the given edgeType.
int getEdgeTypeNumLanes(const std::string &edgeType) const
Returns the number of lanes for the given edgeType.
SVCPermissions getEdgeTypePermissions(const std::string &edgeType) const
Returns allowed vehicle classes for the given edgeType.
void insertEdgeType(const std::string &id, int numLanes, double maxSpeed, int prio, SVCPermissions permissions, double width, bool oneWayIsDefault, double sidewalkWidth, double bikeLaneWidth, double widthResolution, double maxWidth, double minWidth)
Adds a edgeType into the list.
A VISUM network importer.
void load()
Parses the VISUM-network file storing the parsed structures within myNetBuilder.
void parse_Phases()
Parses LSAPHASE/PHASE.
NBCapacity2Lanes myCapacity2Lanes
The converter to compute the lane number of edges from their capacity.
static StringBijection< VISUM_KEY > KEYS
link directions
NBNetBuilder & myNetBuilder
The network builder to fill with loaded values.
void parse_Edges()
Parses STRECKE/STRECKEN.
double getWeightedFloat2(const std::string &name, const std::string &name2, const std::string &suffix)
as above but with two alternative names
~NIImporter_VISUM()
destructor
std::vector< std::string > myTouchedEdges
Already read edges.
NBEdge * getNamedEdge(const std::string &fieldName)
Tries to get the edge which name is stored in the given field.
double getWeightedFloat(const std::string &name, const std::string &suffix)
tries to get a double which is possibly assigned to a certain modality
void parse_VSysTypes()
Parses VSYS.
SVCPermissions getPermissions(const std::string &name, bool warn=false, SVCPermissions unknown=SVCAll)
parse permissions
void parse_NodesToTrafficLights()
Parses KNOTENZULSA/SIGNALANLAGEZUKNOTEN.
void parse_PartOfArea()
Parses FLAECHENELEMENT.
void parse_TrafficLights()
Parses LSA/SIGNALANLAGE.
void parse_Connectors_legacy()
NBNode * getNamedNodeSecure(const std::string &fieldName, NBNode *fallback=0)
void parse_Point()
Parses PUNKT.
void parse_Districts()
Parses BEZIRK.
VSysTypeNames myVSysTypes
The used vsystypes.
std::string myCurrentID
The name of the currently parsed item used for error reporting.
bool getWeightedBool(const std::string &name)
tries to get a bool which is possibly assigned to a certain modality
std::map< NBDistrict *, PositionVector > myDistrictShapes
A temporary storage for district shapes as they are filled incrementally.
std::string myFileName
The name of the parsed file, for error reporting.
std::map< long long int, Position > myPoints
A map of point ids to positions.
void addParser(const std::string &name, ParsingFunction function)
Adds a parser into the sorted list of parsers to use.
static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Loads network definition from the assigned option and stores it in the given network builder.
NIImporter_VISUM(NBNetBuilder &nb, const std::string &file, NBCapacity2Lanes capacity2Lanes, bool useVisumPrio, const std::string &languageFile)
constructor
static StringBijection< VISUM_KEY >::Entry KEYS_DE[]
Strings for the keywords.
std::map< long long int, std::pair< long long int, long long int > > myEdges
A map of edge (not road, but "edge" in this case) ids to from/to-points.
void parse_EdgePolys()
Parses STRECKENPOLY.
LineReader myLineReader
The line reader to use to read from the file.
bool myUseVisumPrio
Information whether VISUM priority information shall be used.
void loadLanguage(const std::string &file)
bool checkNodes(NBNode *from, NBNode *to)
Returns whether both nodes are a valid combination of from/to-nodes.
NBEdge * getReversedContinuating(NBEdge *edge, NBNode *node)
Returns the opposite direction of the given edge.
ParserVector mySingleDataParsers
List of known parsers.
void parse_SignalGroupsToPhases()
Parses LSASIGNALGRUPPEZULSAPHASE.
NBNode * getNamedNode(const std::string &fieldName)
Tries to get the node which name is stored in the given field.
void parse_Kante()
Parses FLAECHENELEMENT.
void parse_SignalGroups()
Parses LSASIGNALGRUPPE/SIGNALGRUPPE.
NBNode * buildDistrictNode(const std::string &id, NBNode *dest, bool isSource)
Builds a node for the given district and returns it.
void parse_Lanes()
Parses FAHRSTREIFEN.
NBEdge * getEdge(NBNode *FromNode, NBNode *ToNode)
Returns the edge that connects both nodes.
NamedColumnsParser myLineParser
the parser to parse the information from the data lines
double getNamedFloat(const std::string &fieldName)
Returns the value from the named column as a float.
std::map< long long int, NBDistrict * > myShapeDistrictMap
A map from district shape definition name to the district.
void parse_Turns()
Parses ABBIEGEBEZIEHUNG/ABBIEGER.
void parse_Nodes()
Parses KNOTEN.
void parse_TurnsToSignalGroups()
Parses ABBZULSASIGNALGRUPPE/SIGNALGRUPPEZUABBIEGER.
NBEdge * getNamedEdgeContinuating(const std::string &fieldName, NBNode *node)
Tries to get the edge which name is stored in the given field continuating the search for a subedge t...
std::string getNamedString(const std::string &fieldName)
Returns the value from the named column as a normalised string.
void parse_LanesConnections()
Parses FAHRSTREIFENABBIEGER.
static bool isSplitEdge(NBEdge *edge, NBNode *node)
whether the edge id ends with _nodeID
void parse_Types()
Parses STRECKENTYP.
void parse_Connectors()
Parses ANBINDUNG.
void parse_AreaSubPartElement()
Parses ABBZULSASIGNALGRUPPE/SIGNALGRUPPEZUABBIEGER.
@ VISUM_DISTRICT_CONNECTION
std::map< long long int, std::vector< long long int > > mySubPartsAreas
A map from area parts to area ids.
NIVisumTL_Map myTLS
List of visum traffic lights.
A signal group can be defined either by a time period or by phases.
std::map< std::string, Phase * > & phases()
Returns the phases map.
NBConnectionVector & connections()
Returns the connections vector.
Intermediate class for storing visum traffic lights during their import.
std::map< std::string, Phase * > & getPhases()
Returns the map of named phases.
SignalGroup & getSignalGroup(const std::string &name)
Returns the named signal group.
void reinit(const std::string &def, const std::string &defDelim=";", const std::string &lineDelim=";", bool chomp=false, bool ignoreCase=true)
Reinitialises the parser.
bool know(const std::string &name) const
Returns the information whether the named column is known.
void parseLine(const std::string &line)
Parses the contents of the line.
std::string get(const std::string &name, bool prune=false) const
Returns the named information.
const std::string & getID() const
Returns the id.
A storage for options typed value containers)
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
A point in 2D or 3D with translation and scaling methods.
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
PositionVector reverse() const
reverse position vector
void remove(const std::string str, const T key)
bool hasString(const std::string &str) const
const std::string & getString(const T key) const
T get(const std::string &str) const
void insert(const std::string str, const T key, bool checkDuplicates=true)
std::vector< std::string > getVector()
return vector of strings
static long long int toLong(const std::string &sData)
converts a string into the long value described by it by calling the char-type converter,...
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
static bool endsWith(const std::string &str, const std::string suffix)
Checks whether a given string ends with the suffix.
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter
A complete call description for parsing a single db.
ParsingFunction function
Pointer to the function used for parsing.
std::string name
The name of the db.
long position
Position of the according db within the file.