Eclipse SUMO - Simulation of Urban MObility
NINavTeqHelper Class Reference

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

#include <NINavTeqHelper.h>

Static Public Member Functions

static void addVehicleClasses (NBEdge &e, const std::string &classS, const SVCPermissions allPermissions, const SVCPermissions defaultPermissions)
 Adds vehicle classes parsing the given list of allowed vehicles. More...
 
static void addVehicleClassesV6 (NBEdge &e, const std::string &classS, const SVCPermissions allPermissions, const SVCPermissions defaultPermissions)
 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...
 

Static Private Member Functions

static bool addCommonVehicleClasses (NBEdge &e, const std::string &classS, const int offset)
 

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 47 of file NINavTeqHelper.h.

Member Function Documentation

◆ addCommonVehicleClasses()

bool NINavTeqHelper::addCommonVehicleClasses ( NBEdge e,
const std::string &  classS,
const int  offset 
)
staticprivate

Definition at line 100 of file NINavTeqHelper.cpp.

References NBEdge::allowVehicleClass(), NBEdge::disallowVehicleClass(), SVC_BUS, SVC_COACH, SVC_DELIVERY, SVC_EMERGENCY, SVC_HOV, SVC_PASSENGER, SVC_TAXI, SVC_TRAILER, and SVC_TRUCK.

Referenced by addVehicleClasses(), and addVehicleClassesV6().

Here is the caller graph for this function:

◆ addVehicleClasses()

void NINavTeqHelper::addVehicleClasses ( NBEdge e,
const std::string &  classS,
const SVCPermissions  allPermissions,
const SVCPermissions  defaultPermissions 
)
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 153 of file NINavTeqHelper.cpp.

References addCommonVehicleClasses(), NBEdge::allowVehicleClass(), NBEdge::disallowVehicleClass(), NBEdge::setPermissions(), SVC_BICYCLE, SVC_PASSENGER, and SVC_PEDESTRIAN.

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

Here is the caller graph for this function:

◆ addVehicleClassesV6()

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

same as addVehicleClasses but for version 6+

Definition at line 190 of file NINavTeqHelper.cpp.

References addCommonVehicleClasses(), NBEdge::allowVehicleClass(), NBEdge::disallowVehicleClass(), NBEdge::setPermissions(), SVC_BICYCLE, SVC_MOTORCYCLE, SVC_PASSENGER, and SVC_PEDESTRIAN.

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

Here is the caller graph for this function:

◆ 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 TLF, and StringUtils::toInt().

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

Here is the caller graph for this function:

◆ 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 TLF, and StringUtils::toInt().

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

Here is the caller graph for this function:

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