SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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)
 Adds vehicle classes parsing the given list of allowed vehicles. More...
 
static unsigned int getLaneNumber (const std::string &id, const std::string &laneNoS, SUMOReal speed)
 Returns the lane number evaluating the given Navteq-description. More...
 
static SUMOReal 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 57 of file NINavTeqHelper.h.

Member Function Documentation

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 111 of file NINavTeqHelper.cpp.

References NBEdge::allowVehicleClass(), NBEdge::setPermissions(), SVC_BICYCLE, SVC_BUS, SVC_DELIVERY, SVC_HOV, SVC_PASSENGER, SVC_PEDESTRIAN, SVC_PUBLIC_EMERGENCY, SVC_PUBLIC_TRANSPORT, SVC_TAXI, and SVC_TRANSPORT.

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

unsigned int NINavTeqHelper::getLaneNumber ( const std::string &  id,
const std::string &  laneNoS,
SUMOReal  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 81 of file NINavTeqHelper.cpp.

References TplConvert::_2int().

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

SUMOReal 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 49 of file NINavTeqHelper.cpp.

References TplConvert::_2int(), and SUMOReal.

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


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