SUMO - Simulation of Urban MObility
NIImporter_DlrNavteq::EdgesHandler Class Reference

Importer of edges stored in unsplit elmar format. More...

#include <NIImporter_DlrNavteq.h>

Inheritance diagram for NIImporter_DlrNavteq::EdgesHandler:
Inheritance graph
Collaboration diagram for NIImporter_DlrNavteq::EdgesHandler:
Collaboration graph

Public Member Functions

 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. More...
 
bool report (const std::string &result)
 Parsing method. More...
 
 ~EdgesHandler ()
 Destructor. More...
 

Protected Types

enum  ColumnName {
  LINK_ID = 0, NODE_ID_FROM, NODE_ID_TO, BETWEEN_NODE_ID,
  LENGTH, VEHICLE_TYPE, FORM_OF_WAY, BRUNNEL_TYPE,
  FUNCTIONAL_ROAD_CLASS, SPEED_CATEGORY, NUMBER_OF_LANES, SPEED_LIMIT,
  SPEED_RESTRICTION, NAME_ID1_REGIONAL, NAME_ID2_LOCAL, HOUSENUMBERS_RIGHT,
  HOUSENUMBERS_LEFT, ZIP_CODE, AREA_ID, SUBAREA_ID,
  THROUGH_TRAFFIC, SPECIAL_RESTRICTIONS, EXTENDED_NUMBER_OF_LANES, ISRAMP,
  CONNECTION
}
 

Protected Member Functions

std::string getColumn (const StringTokenizer &st, ColumnName name, const std::string fallback="")
 

Protected Attributes

std::vector< int > myColumns
 the version number of the edge file being parsed More...
 
NBEdgeContmyEdgeCont
 The edge container to store loaded edges into. More...
 
const std::string myFile
 the file being parsed More...
 
std::map< std::string, PositionVector > & myGeoms
 Previously read edge geometries (manipulated during use) More...
 
NBNodeContmyNodeCont
 The node container to get the referenced nodes from. More...
 
std::map< std::string, std::string > & myStreetNames
 Previously read streat names (non-const because operate[] is more convenient) More...
 
bool myTryIgnoreNodePositions
 Whether node positions shall not be added to the edge's geometry. More...
 
NBTypeContmyTypeCont
 The type container to retrieve type info from. More...
 
double myVersion
 version number of current file More...
 

Static Protected Attributes

static const int MISSING_COLUMN = std::numeric_limits<int>::max()
 

Private Member Functions

 EdgesHandler (const EdgesHandler &)
 Invalidated copy constructor. More...
 
std::string getStreetNameFromIDs (const std::string &regionalID, const std::string &localID) const
 build the street name for the given ids More...
 
EdgesHandleroperator= (const EdgesHandler &)
 Invalidated assignment operator. More...
 

Detailed Description

Importer of edges stored in unsplit elmar format.

Being a LineHandler, this class retrieves each line from a LineReader and parses these information assuming they contain edge definitions in DLRNavteq's unsplit format.

Definition at line 147 of file NIImporter_DlrNavteq.h.

Member Enumeration Documentation

◆ ColumnName

Enumerator
LINK_ID 
NODE_ID_FROM 
NODE_ID_TO 
BETWEEN_NODE_ID 
LENGTH 
VEHICLE_TYPE 
FORM_OF_WAY 
BRUNNEL_TYPE 
FUNCTIONAL_ROAD_CLASS 
SPEED_CATEGORY 
NUMBER_OF_LANES 
SPEED_LIMIT 
SPEED_RESTRICTION 
NAME_ID1_REGIONAL 
NAME_ID2_LOCAL 
HOUSENUMBERS_RIGHT 
HOUSENUMBERS_LEFT 
ZIP_CODE 
AREA_ID 
SUBAREA_ID 
THROUGH_TRAFFIC 
SPECIAL_RESTRICTIONS 
EXTENDED_NUMBER_OF_LANES 
ISRAMP 
CONNECTION 

Definition at line 210 of file NIImporter_DlrNavteq.h.

Constructor & Destructor Documentation

◆ EdgesHandler() [1/2]

NIImporter_DlrNavteq::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.

Parameters
[in]ncThe node control to retrieve nodes from

Definition at line 257 of file NIImporter_DlrNavteq.cpp.

◆ ~EdgesHandler()

NIImporter_DlrNavteq::EdgesHandler::~EdgesHandler ( )

Destructor.

Definition at line 271 of file NIImporter_DlrNavteq.cpp.

◆ EdgesHandler() [2/2]

NIImporter_DlrNavteq::EdgesHandler::EdgesHandler ( const EdgesHandler )
private

Invalidated copy constructor.

Member Function Documentation

◆ getColumn()

std::string NIImporter_DlrNavteq::EdgesHandler::getColumn ( const StringTokenizer st,
ColumnName  name,
const std::string  fallback = "" 
)
protected

◆ getStreetNameFromIDs()

std::string NIImporter_DlrNavteq::EdgesHandler::getStreetNameFromIDs ( const std::string &  regionalID,
const std::string &  localID 
) const
private

build the street name for the given ids

Definition at line 450 of file NIImporter_DlrNavteq.cpp.

References myStreetNames.

Referenced by report().

◆ operator=()

EdgesHandler& NIImporter_DlrNavteq::EdgesHandler::operator= ( const EdgesHandler )
private

Invalidated assignment operator.

◆ report()

Field Documentation

◆ MISSING_COLUMN

const int NIImporter_DlrNavteq::EdgesHandler::MISSING_COLUMN = std::numeric_limits<int>::max()
staticprotected

Definition at line 208 of file NIImporter_DlrNavteq.h.

Referenced by getColumn(), and report().

◆ myColumns

std::vector<int> NIImporter_DlrNavteq::EdgesHandler::myColumns
protected

the version number of the edge file being parsed

Definition at line 203 of file NIImporter_DlrNavteq.h.

Referenced by getColumn(), and report().

◆ myEdgeCont

NBEdgeCont& NIImporter_DlrNavteq::EdgesHandler::myEdgeCont
protected

The edge container to store loaded edges into.

Definition at line 185 of file NIImporter_DlrNavteq.h.

Referenced by report().

◆ myFile

const std::string NIImporter_DlrNavteq::EdgesHandler::myFile
protected

the file being parsed

Definition at line 206 of file NIImporter_DlrNavteq.h.

Referenced by report().

◆ myGeoms

std::map<std::string, PositionVector>& NIImporter_DlrNavteq::EdgesHandler::myGeoms
protected

Previously read edge geometries (manipulated during use)

Definition at line 191 of file NIImporter_DlrNavteq.h.

Referenced by report().

◆ myNodeCont

NBNodeCont& NIImporter_DlrNavteq::EdgesHandler::myNodeCont
protected

The node container to get the referenced nodes from.

Definition at line 182 of file NIImporter_DlrNavteq.h.

Referenced by report().

◆ myStreetNames

std::map<std::string, std::string>& NIImporter_DlrNavteq::EdgesHandler::myStreetNames
protected

Previously read streat names (non-const because operate[] is more convenient)

Definition at line 194 of file NIImporter_DlrNavteq.h.

Referenced by getStreetNameFromIDs().

◆ myTryIgnoreNodePositions

bool NIImporter_DlrNavteq::EdgesHandler::myTryIgnoreNodePositions
protected

Whether node positions shall not be added to the edge's geometry.

Definition at line 197 of file NIImporter_DlrNavteq.h.

◆ myTypeCont

NBTypeCont& NIImporter_DlrNavteq::EdgesHandler::myTypeCont
protected

The type container to retrieve type info from.

Definition at line 188 of file NIImporter_DlrNavteq.h.

Referenced by report().

◆ myVersion

double NIImporter_DlrNavteq::EdgesHandler::myVersion
protected

version number of current file

Definition at line 200 of file NIImporter_DlrNavteq.h.

Referenced by report().


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