Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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.

Protected Member Functions

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

Private Member Functions

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

Private Attributes

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

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 & 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]shp_nameThe name of the according shape file
[in]speedInKMHWhether the speed shall be assumed to be given in km/h

Definition at line 107 of file NIImporter_ArcView.cpp.

References myEdgeCont, myNameAddition, myNodeCont, myOptions, myRunningEdgeID, myRunningNodeID, mySHPName, mySpeedInKMH, and myTypeCont.

Referenced by loadNetwork(), NIImporter_ArcView(), and operator=().

Here is the caller graph for this function:

◆ ~NIImporter_ArcView()

NIImporter_ArcView::~NIImporter_ArcView ( )
protected

Destructor.

Definition at line 122 of file NIImporter_ArcView.cpp.

◆ NIImporter_ArcView() [2/2]

NIImporter_ArcView::NIImporter_ArcView ( const NIImporter_ArcView & )
private

Invalidated copy constructor.

References NIImporter_ArcView().

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(), NIImporter_ArcView(), StringUtils::startsWith(), 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.

References NIImporter_ArcView().

Field Documentation

◆ myEdgeCont

NBEdgeCont& NIImporter_ArcView::myEdgeCont
private

The container to add edges to.

Definition at line 168 of file NIImporter_ArcView.h.

Referenced by load(), and NIImporter_ArcView().

◆ myNameAddition

int NIImporter_ArcView::myNameAddition
private

A running number to assure unique edge ids.

Definition at line 162 of file NIImporter_ArcView.h.

Referenced by NIImporter_ArcView().

◆ myNodeCont

NBNodeCont& NIImporter_ArcView::myNodeCont
private

The container to add nodes to.

Definition at line 165 of file NIImporter_ArcView.h.

Referenced by load(), and NIImporter_ArcView().

◆ myOptions

const OptionsCont& NIImporter_ArcView::myOptions
private

The options to use.

Definition at line 156 of file NIImporter_ArcView.h.

Referenced by load(), and NIImporter_ArcView().

◆ myRunningEdgeID

int NIImporter_ArcView::myRunningEdgeID
private

A running number to assure unique ids (as fallback).

Definition at line 177 of file NIImporter_ArcView.h.

Referenced by load(), and NIImporter_ArcView().

◆ myRunningNodeID

int NIImporter_ArcView::myRunningNodeID
private

Definition at line 178 of file NIImporter_ArcView.h.

Referenced by load(), and NIImporter_ArcView().

◆ mySHPName

std::string NIImporter_ArcView::mySHPName
private

The name of the shape file.

Definition at line 159 of file NIImporter_ArcView.h.

Referenced by load(), and NIImporter_ArcView().

◆ mySpeedInKMH

bool NIImporter_ArcView::mySpeedInKMH
private

Whether the speed is given in km/h.

Definition at line 174 of file NIImporter_ArcView.h.

Referenced by load(), and NIImporter_ArcView().

◆ myTypeCont

NBTypeCont& NIImporter_ArcView::myTypeCont
private

The container to get the types from.

Definition at line 171 of file NIImporter_ArcView.h.

Referenced by load(), and NIImporter_ArcView().


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