107 if (!oc.
isSet(
"itsumo-files")) {
115 for (std::vector<std::string>::const_iterator file = files.begin(); file != files.end(); ++file) {
118 WRITE_ERROR(
"Could not open itsumo-file '" + *file +
"'.");
212 for (std::vector<LaneSet*>::iterator j = (*i)->laneSets.begin(); j != (*i)->laneSets.end(); ++j) {
217 WRITE_ERROR(
"Could not add edge '" + ls->
id +
"'. Probably declared twice.");
232 WRITE_ERROR(
"Unable to project coordinates for node '" +
id +
"'.");
237 WRITE_ERROR(
"Could not add node '" +
id +
"'. Probably declared twice.");
259 if (from ==
nullptr || to ==
nullptr) {
263 WRITE_ERROR(
"Fond laneset-id '" +
id +
"' twice.");
NBNode * retrieve(const std::string &id) const
Returns the node with the given name.
std::vector< Lane > lanes
static bool transformCoordinate(Position &from, bool includeInBoundary=true, GeoConvHelper *from_srs=0)
transforms loaded coordinates handles projections, offsets (using GeoConvHelper) and import of height...
static bool isReadable(std::string path)
Checks whether the given file is readable.
std::vector< Section * > mySections
std::vector< Lane > myCurrentLanes
The representation of a single edge during network building.
static const double UNSPECIFIED_OFFSET
unspecified lane offset
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
static const double UNSPECIFIED_WIDTH
unspecified lane width
std::vector< LaneSet * > myCurrentLaneSets
static StringBijection< int >::Entry itsumoAttrs[]
The names of MATSIM-XML attributes (for passing to GenericSAXHandler)
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
void myEndElement(int element)
Callback method for a closing tag to implement by derived classes.
A handler which converts occuring elements and attributes into enums.
static StringBijection< int >::Entry itsumoTags[]
The names of MATSIM-XML elements (for passing to GenericSAXHandler)
void setFileName(const std::string &name)
Sets the current file name.
bool insert(NBEdge *edge, bool ignorePrunning=false)
Adds an edge to the dictionary.
Encapsulated SAX-Attributes.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter ...
A point in 2D or 3D with translation and scaling methods.
NBEdgeCont & getEdgeCont()
void myCharacters(int element, const std::string &chars)
Callback method for characters to implement by derived classes.
std::vector< std::string > getStringVector(const std::string &name) const
Returns the list of string-vector-value of the named option (only for Option_String) ...
#define PROGRESS_BEGIN_MESSAGE(msg)
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter...
std::map< std::string, std::string > myParameter
A temporary parameter map.
static std::string prune(const std::string &str)
Removes trailing and leading whitechars.
NBNodeCont & getNodeCont()
Returns a reference to the node container.
Instance responsible for building networks.
A storage for options typed value containers)
bool insert(const std::string &id, const Position &position, NBDistrict *district=0)
Inserts a node into the map.
static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Loads content of the optionally given ITSUMO network files.
Represents a single node (junction) during network building.
NBNetBuilder & myNetBuilder
The container to fill.
#define PROGRESS_DONE_MESSAGE()
std::map< std::string, LaneSet * > myLaneSets
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
Handler(NBNetBuilder &toFill)
Contructor.