Eclipse SUMO - Simulation of Urban MObility
NIImporter_ArcView Class Reference

Importer for networks stored in ArcView-shape format. More...

#include <NIImporter_ArcView.h>

Collaboration diagram for NIImporter_ArcView:
[legend]

Static Public Member Functions

static void loadNetwork (const OptionsCont &oc, NBNetBuilder &nb)
 Loads content of the optionally given ArcView Shape files. More...
 

Protected Member Functions

void load ()
 Loads the shape files. More...
 
 NIImporter_ArcView (const OptionsCont &oc, NBNodeCont &nc, NBEdgeCont &ec, NBTypeCont &tc, const std::string &dbf_name, const std::string &shp_name, bool speedInKMH)
 Constructor. More...
 
 ~NIImporter_ArcView ()
 Destructor. More...
 

Private Member Functions

 NIImporter_ArcView (const NIImporter_ArcView &)
 Invalidated copy constructor. More...
 
NIImporter_ArcViewoperator= (const NIImporter_ArcView &)
 Invalidated assignment operator. More...
 

Private Attributes

NBEdgeContmyEdgeCont
 The container to add edges to. More...
 
int myNameAddition
 A running number to assure unique edge ids. More...
 
NBNodeContmyNodeCont
 The container to add nodes to. More...
 
const OptionsContmyOptions
 The options to use. More...
 
int myRunningEdgeID
 A running number to assure unique ids (as fallback) More...
 
int myRunningNodeID
 
std::string mySHPName
 The name of the shape file. More...
 
bool mySpeedInKMH
 Whether the speed is given in km/h. More...
 
NBTypeContmyTypeCont
 The container to get the types from. More...
 

Detailed Description

Importer for networks stored in ArcView-shape format.

The current importer works only if SUMO was compiled with GDAL-support. If not, an error message is generated.

Todo:
reinsert import via shapelib

Definition at line 47 of file NIImporter_ArcView.h.

Constructor & Destructor Documentation

◆ NIImporter_ArcView() [1/2]

NIImporter_ArcView::NIImporter_ArcView ( const OptionsCont oc,
NBNodeCont nc,
NBEdgeCont ec,
NBTypeCont tc,
const std::string &  dbf_name,
const std::string &  shp_name,
bool  speedInKMH 
)
protected

Constructor.

Parameters
[in]ocOptions container to read options from
[in]ncThe node container to store nodes into
[in]ecThe edge container to store edges into
[in]tcThe type container to get edge types from
[in]dbf_nameThe name of the according database file
[in]shp_nameThe name of the according shape file
[in]speedInKMHWhether the speed shall be assumed to be given in km/h

Definition at line 106 of file NIImporter_ArcView.cpp.

References UNUSED_PARAMETER.

◆ ~NIImporter_ArcView()

NIImporter_ArcView::~NIImporter_ArcView ( )
protected

Destructor.

Definition at line 123 of file NIImporter_ArcView.cpp.

◆ NIImporter_ArcView() [2/2]

NIImporter_ArcView::NIImporter_ArcView ( const NIImporter_ArcView )
private

Invalidated copy constructor.

Member Function Documentation

◆ load()

◆ loadNetwork()

void NIImporter_ArcView::loadNetwork ( const OptionsCont oc,
NBNetBuilder nb 
)
static

Loads content of the optionally given ArcView Shape files.

If the option "shapefile-prefix" is set, the file stored therein is read and the network definition stored therein is stored within the given network builder.

If the option "shapefile-prefix" is not set, this method simply returns.

Parameters
[in]ocThe options to use
[in]nbThe network builder to fill

Definition at line 72 of file NIImporter_ArcView.cpp.

References OptionsCont::getBool(), NBNetBuilder::getEdgeCont(), MsgHandler::getErrorInstance(), NBNetBuilder::getNodeCont(), OptionsCont::getString(), NBNetBuilder::getTypeCont(), FileHelpers::isReadable(), OptionsCont::isSet(), load(), and WRITE_ERROR.

Referenced by NILoader::load().

Here is the caller graph for this function:

◆ operator=()

NIImporter_ArcView& NIImporter_ArcView::operator= ( const NIImporter_ArcView )
private

Invalidated assignment operator.

Field Documentation

◆ myEdgeCont

NBEdgeCont& NIImporter_ArcView::myEdgeCont
private

The container to add edges to.

Definition at line 169 of file NIImporter_ArcView.h.

Referenced by load().

◆ myNameAddition

int NIImporter_ArcView::myNameAddition
private

A running number to assure unique edge ids.

Definition at line 163 of file NIImporter_ArcView.h.

◆ myNodeCont

NBNodeCont& NIImporter_ArcView::myNodeCont
private

The container to add nodes to.

Definition at line 166 of file NIImporter_ArcView.h.

Referenced by load().

◆ myOptions

const OptionsCont& NIImporter_ArcView::myOptions
private

The options to use.

Definition at line 157 of file NIImporter_ArcView.h.

Referenced by load().

◆ myRunningEdgeID

int NIImporter_ArcView::myRunningEdgeID
private

A running number to assure unique ids (as fallback)

Definition at line 178 of file NIImporter_ArcView.h.

Referenced by load().

◆ myRunningNodeID

int NIImporter_ArcView::myRunningNodeID
private

Definition at line 179 of file NIImporter_ArcView.h.

Referenced by load().

◆ mySHPName

std::string NIImporter_ArcView::mySHPName
private

The name of the shape file.

Definition at line 160 of file NIImporter_ArcView.h.

Referenced by load().

◆ mySpeedInKMH

bool NIImporter_ArcView::mySpeedInKMH
private

Whether the speed is given in km/h.

Definition at line 175 of file NIImporter_ArcView.h.

Referenced by load().

◆ myTypeCont

NBTypeCont& NIImporter_ArcView::myTypeCont
private

The container to get the types from.

Definition at line 172 of file NIImporter_ArcView.h.

Referenced by load().


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