Eclipse SUMO - Simulation of Urban MObility
NINavTeqHelper Class Reference

Some parser methods shared around several formats containing NavTeq-Nets. More...

#include <NINavTeqHelper.h>

Collaboration diagram for NINavTeqHelper:

Static Public Member Functions

static void addVehicleClasses (NBEdge &e, const std::string &classS)
 Adds vehicle classes parsing the given list of allowed vehicles. More...
 
static void addVehicleClassesV6 (NBEdge &e, const std::string &classS)
 same as addVehicleClasses but for version 6+ More...
 
static int getLaneNumber (const std::string &id, const std::string &laneNoS, double speed)
 Returns the lane number evaluating the given Navteq-description. More...
 
static double getSpeed (const std::string &id, const std::string &speedClassS)
 Returns the speed evaluating the given Navteq-description. More...
 

Detailed Description

Some parser methods shared around several formats containing NavTeq-Nets.

Networks from NavTeq ofte use categories for speed limits and the number of lanes. This class parses such categories and converts them into proper values.

Definition at line 50 of file NINavTeqHelper.h.

Member Function Documentation

◆ addVehicleClasses()

void NINavTeqHelper::addVehicleClasses ( NBEdge e,
const std::string &  classS 
)
static

Adds vehicle classes parsing the given list of allowed vehicles.

Parses the given class-string and sets all set (allowed) vehicle types into the given edge using "addVehicleClass".

Parameters
[in]eThe edge to set the parsed vehicle classes into
[in]classSThe string that contains the information whether a vehicle class is allowed
See also
addVehicleClass

Definition at line 100 of file NINavTeqHelper.cpp.

References NBEdge::allowVehicleClass(), NBEdge::setPermissions(), SVC_BICYCLE, SVC_BUS, SVC_COACH, SVC_DELIVERY, SVC_EMERGENCY, SVC_HOV, SVC_PASSENGER, SVC_PEDESTRIAN, SVC_TAXI, SVC_TRAILER, SVC_TRUCK, and SVCAll.

Referenced by NIImporter_DlrNavteq::EdgesHandler::report().

◆ addVehicleClassesV6()

void NINavTeqHelper::addVehicleClassesV6 ( NBEdge e,
const std::string &  classS 
)
static

◆ getLaneNumber()

int NINavTeqHelper::getLaneNumber ( const std::string &  id,
const std::string &  laneNoS,
double  speed 
)
static

Returns the lane number evaluating the given Navteq-description.

Parameters
[in]idThe id of the edge (for debug-output)
[in]laneNoSThe string that describes the number of lanes
[in]speedAn additional hint for guessing the proper lane number
Returns
The converted lane number
Exceptions
ProcessErrorIf the given lane number definition is not a number or if it is not known

Definition at line 70 of file NINavTeqHelper.cpp.

References StringUtils::toInt().

Referenced by NIImporter_ArcView::load(), and NIImporter_DlrNavteq::EdgesHandler::report().

◆ getSpeed()

double NINavTeqHelper::getSpeed ( const std::string &  id,
const std::string &  speedClassS 
)
static

Returns the speed evaluating the given Navteq-description.

This method tries to parse the speed category into its int-representation and to determine the speed that is assigned to the category. If either of both steps can not be perfored, a ProcessError is thrown.

Parameters
[in]idThe id of the edge (for debug-output)
[in]speedClassSThe string that describes the speed class
Returns
The converted speed (in m/s)
Exceptions
ProcessErrorIf the given speed class definition is not a number or if it is not known

Definition at line 38 of file NINavTeqHelper.cpp.

References StringUtils::toInt().

Referenced by NIImporter_ArcView::load(), and NIImporter_DlrNavteq::EdgesHandler::report().


The documentation for this class was generated from the following files: