|
SUMO - Simulation of Urban MObility
|
Importer for networks stored in openDrive format. More...
#include <NIImporter_OpenDrive.h>
Data Structures | |
| struct | Connection |
| class | edge_by_id_finder |
| struct | OpenDriveEdge |
| Representation of an openDrive "link". More... | |
| struct | OpenDriveGeometry |
| Representation of an openDrive geometry part. More... | |
| struct | OpenDriveLane |
| Representation of a lane. More... | |
| struct | OpenDriveLaneSection |
| Representation of a lane section. More... | |
| struct | OpenDriveLink |
| Representation of an openDrive connection. More... | |
Public Member Functions | |
| void | characters (const XMLCh *const chars, const XERCES3_SIZE_t length) |
| The inherited method called when characters occured. | |
| void | endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) |
| The inherited method called when a tag is being closed. | |
| const std::string & | getFileName () const throw () |
| returns the current file name | |
| void | registerParent (const int tag, GenericSAXHandler *handler) |
| Assigning a parent handler which is enabled when the specified tag is closed. | |
| void | setFileName (const std::string &name) throw () |
| Sets the current file name. | |
| void | startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs) |
| The inherited method called when a new tag opens. | |
SAX ErrorHandler callbacks | |
| void | warning (const SAXParseException &exception) throw () |
| Handler for XML-warnings. | |
| void | error (const SAXParseException &exception) throw (ProcessError) |
| Handler for XML-errors. | |
| void | fatalError (const SAXParseException &exception) throw (ProcessError) |
| Handler for XML-errors. | |
Static Public Member Functions | |
| static void | loadNetwork (const OptionsCont &oc, NBNetBuilder &nb) |
| Loads content of the optionally given SUMO file. | |
Protected Types | |
| enum | ContactPoint { OPENDRIVE_CP_UNKNOWN, OPENDRIVE_CP_START, OPENDRIVE_CP_END } |
| enum | ElementType { OPENDRIVE_ET_UNKNOWN, OPENDRIVE_ET_ROAD, OPENDRIVE_ET_JUNCTION } |
| enum | GeometryType { OPENDRIVE_GT_UNKNOWN, OPENDRIVE_GT_LINE, OPENDRIVE_GT_SPIRAL, OPENDRIVE_GT_ARC, OPENDRIVE_GT_POLY3 } |
| enum | LinkType { OPENDRIVE_LT_SUCCESSOR, OPENDRIVE_LT_PREDECESSOR } |
| enum | OpenDriveXMLAttr { OPENDRIVE_ATTR_NOTHING, OPENDRIVE_ATTR_REVMAJOR, OPENDRIVE_ATTR_REVMINOR, OPENDRIVE_ATTR_ID, OPENDRIVE_ATTR_LENGTH, OPENDRIVE_ATTR_JUNCTION, OPENDRIVE_ATTR_ELEMENTTYPE, OPENDRIVE_ATTR_ELEMENTID, OPENDRIVE_ATTR_CONTACTPOINT, OPENDRIVE_ATTR_S, OPENDRIVE_ATTR_X, OPENDRIVE_ATTR_Y, OPENDRIVE_ATTR_HDG, OPENDRIVE_ATTR_CURVSTART, OPENDRIVE_ATTR_CURVEND, OPENDRIVE_ATTR_CURVATURE, OPENDRIVE_ATTR_A, OPENDRIVE_ATTR_B, OPENDRIVE_ATTR_C, OPENDRIVE_ATTR_D, OPENDRIVE_ATTR_TYPE, OPENDRIVE_ATTR_LEVEL } |
Numbers representing openDrive-XML - attributes. More... | |
| enum | OpenDriveXMLTag { OPENDRIVE_TAG_NOTHING, OPENDRIVE_TAG_HEADER, OPENDRIVE_TAG_ROAD, OPENDRIVE_TAG_PREDECESSOR, OPENDRIVE_TAG_SUCCESSOR, OPENDRIVE_TAG_GEOMETRY, OPENDRIVE_TAG_LINE, OPENDRIVE_TAG_SPIRAL, OPENDRIVE_TAG_ARC, OPENDRIVE_TAG_POLY3, OPENDRIVE_TAG_LANESECTION, OPENDRIVE_TAG_LEFT, OPENDRIVE_TAG_CENTER, OPENDRIVE_TAG_RIGHT, OPENDRIVE_TAG_LANE } |
Numbers representing openDrive-XML - element names. More... | |
Protected Member Functions | |
| std::string | buildErrorMessage (const SAXParseException &exception) throw () |
| Builds an error message. | |
| NIImporter_OpenDrive (std::vector< OpenDriveEdge > &innerEdges, std::vector< OpenDriveEdge > &outerEdges) | |
| Constructor. | |
| ~NIImporter_OpenDrive () throw () | |
| Destructor. | |
inherited from GenericSAXHandler | |
| void | myStartElement (int element, const SUMOSAXAttributes &attrs) throw (ProcessError) |
| Called on the opening of a tag;. | |
| void | myCharacters (int element, const std::string &chars) throw (ProcessError) |
| Called when characters occure. | |
| void | myEndElement (int element) throw (ProcessError) |
| Called when a closing tag occurs. | |
Static Protected Member Functions | |
| static void | addE2EConnectionsSecure (const NBEdgeCont &ec, const NBNode *const node, const OpenDriveEdge &from, const OpenDriveEdge &to, std::vector< NIImporter_OpenDrive::Connection > &connections) |
| static void | addViaConnectionSecure (const NBEdgeCont &ec, const NBNode *const node, const OpenDriveEdge &e, LinkType lt, const std::string &via, std::vector< NIImporter_OpenDrive::Connection > &connections) |
| static void | calcPointOnCurve (SUMOReal *ad_x, SUMOReal *ad_y, SUMOReal ad_centerX, SUMOReal ad_centerY, SUMOReal ad_r, SUMOReal ad_length) throw () |
| static void | calculateCurveCenter (SUMOReal *ad_x, SUMOReal *ad_y, SUMOReal ad_radius, SUMOReal ad_hdg) throw () |
| static Position | calculateStraightEndPoint (double hdg, double length, const Position &start) throw () |
| static void | computeShapes (std::vector< OpenDriveEdge > &edges) throw () |
| static std::vector< Position > | geomFromArc (const OpenDriveEdge &e, const OpenDriveGeometry &g) throw () |
| static std::vector< Position > | geomFromLine (const OpenDriveEdge &e, const OpenDriveGeometry &g) throw () |
| static std::vector< Position > | geomFromPoly (const OpenDriveEdge &e, const OpenDriveGeometry &g) throw () |
| static std::vector< Position > | geomFromSpiral (const OpenDriveEdge &e, const OpenDriveGeometry &g) throw () |
| static NBEdge * | getIncomingDirectionalEdge (const NBEdgeCont &ec, const NBNodeCont &nc, const std::string &edgeID, const std::string &nodeID) throw () |
| static NBNode * | getOrBuildNode (const std::string &id, Position &pos, NBNodeCont &nc) throw (ProcessError) |
| Builds a node or returns the already built. | |
| static NBEdge * | getOutgoingDirectionalEdge (const NBEdgeCont &ec, const NBNodeCont &nc, const std::string &edgeID, const std::string &nodeID) throw () |
| static void | setLaneConnections (NIImporter_OpenDrive::Connection &c, const OpenDriveEdge &from, bool fromAtBegin, OpenDriveXMLTag fromLaneDir, const OpenDriveEdge &to, bool toAtEnd, OpenDriveXMLTag toLaneDir) |
| static void | setLaneConnections (NIImporter_OpenDrive::Connection &c, const OpenDriveEdge &from, bool fromAtBegin, OpenDriveXMLTag fromLaneDir, const OpenDriveEdge &via, bool viaIsReversed, OpenDriveXMLTag viaLaneDir, const OpenDriveEdge &to, bool fromAtEnd, OpenDriveXMLTag toLaneDir) |
| static void | setNodeSecure (NBNodeCont &nc, OpenDriveEdge &e, const std::string &nodeID, NIImporter_OpenDrive::LinkType lt) throw (ProcessError) |
Static Protected Attributes | |
| static StringBijection< int > ::Entry | openDriveAttrs [] |
| The names of openDrive-XML attributes (for passing to GenericSAXHandler) | |
| static StringBijection< int > ::Entry | openDriveTags [] |
| The names of openDrive-XML elements (for passing to GenericSAXHandler) | |
Private Member Functions | |
| void | addGeometryShape (GeometryType type, const std::vector< SUMOReal > &vals) throw (ProcessError) |
| void | addLink (LinkType lt, const std::string &elementType, const std::string &elementID, const std::string &contactPoint) throw (ProcessError) |
Private Attributes | |
| OpenDriveEdge | myCurrentEdge |
| OpenDriveXMLTag | myCurrentLaneDirection |
| std::vector< int > | myElementStack |
| std::vector< OpenDriveEdge > & | myInnerEdges |
| std::vector< OpenDriveEdge > & | myOuterEdges |
Importer for networks stored in openDrive format.
Definition at line 58 of file NIImporter_OpenDrive.h.
enum NIImporter_OpenDrive::ContactPoint [protected] |
Definition at line 147 of file NIImporter_OpenDrive.h.
enum NIImporter_OpenDrive::ElementType [protected] |
Definition at line 141 of file NIImporter_OpenDrive.h.
enum NIImporter_OpenDrive::GeometryType [protected] |
| OPENDRIVE_GT_UNKNOWN | |
| OPENDRIVE_GT_LINE | |
| OPENDRIVE_GT_SPIRAL | |
| OPENDRIVE_GT_ARC | |
| OPENDRIVE_GT_POLY3 |
Definition at line 153 of file NIImporter_OpenDrive.h.
enum NIImporter_OpenDrive::LinkType [protected] |
Definition at line 136 of file NIImporter_OpenDrive.h.
enum NIImporter_OpenDrive::OpenDriveXMLAttr [protected] |
Numbers representing openDrive-XML - attributes.
Definition at line 111 of file NIImporter_OpenDrive.h.
enum NIImporter_OpenDrive::OpenDriveXMLTag [protected] |
Numbers representing openDrive-XML - element names.
Definition at line 85 of file NIImporter_OpenDrive.h.
| NIImporter_OpenDrive::NIImporter_OpenDrive | ( | std::vector< OpenDriveEdge > & | innerEdges, |
| std::vector< OpenDriveEdge > & | outerEdges | ||
| ) | [protected] |
Constructor.
| [in] | nc | The node control to fill |
Definition at line 846 of file NIImporter_OpenDrive.cpp.
| NIImporter_OpenDrive::~NIImporter_OpenDrive | ( | ) | throw () [protected] |
Destructor.
Definition at line 854 of file NIImporter_OpenDrive.cpp.
| void NIImporter_OpenDrive::addE2EConnectionsSecure | ( | const NBEdgeCont & | ec, |
| const NBNode *const | node, | ||
| const OpenDriveEdge & | from, | ||
| const OpenDriveEdge & | to, | ||
| std::vector< NIImporter_OpenDrive::Connection > & | connections | ||
| ) | [static, protected] |
Definition at line 486 of file NIImporter_OpenDrive.cpp.
References NIImporter_OpenDrive::Connection::from, Named::getID(), NBNode::hasIncoming(), NBNode::hasOutgoing(), NIImporter_OpenDrive::OpenDriveEdge::id, OPENDRIVE_TAG_LEFT, OPENDRIVE_TAG_RIGHT, NBEdgeCont::retrieve(), setLaneConnections(), and NIImporter_OpenDrive::Connection::to.
Referenced by loadNetwork().
| void NIImporter_OpenDrive::addGeometryShape | ( | GeometryType | type, |
| const std::vector< SUMOReal > & | vals | ||
| ) | throw (ProcessError) [private] |
Definition at line 1027 of file NIImporter_OpenDrive.cpp.
References NIImporter_OpenDrive::OpenDriveGeometry::params, and NIImporter_OpenDrive::OpenDriveGeometry::type.
| void NIImporter_OpenDrive::addLink | ( | LinkType | lt, |
| const std::string & | elementType, | ||
| const std::string & | elementID, | ||
| const std::string & | contactPoint | ||
| ) | throw (ProcessError) [private] |
Definition at line 1005 of file NIImporter_OpenDrive.cpp.
References NIImporter_OpenDrive::OpenDriveLink::contactPoint, and NIImporter_OpenDrive::OpenDriveLink::elementType.
| void NIImporter_OpenDrive::addViaConnectionSecure | ( | const NBEdgeCont & | ec, |
| const NBNode *const | node, | ||
| const OpenDriveEdge & | e, | ||
| LinkType | lt, | ||
| const std::string & | via, | ||
| std::vector< NIImporter_OpenDrive::Connection > & | connections | ||
| ) | [static, protected] |
Definition at line 450 of file NIImporter_OpenDrive.cpp.
References NIImporter_OpenDrive::OpenDriveEdge::id, OPENDRIVE_LT_PREDECESSOR, NBEdgeCont::retrieve(), and NIImporter_OpenDrive::OpenDriveEdge::to.
Referenced by loadNetwork().
| std::string GenericSAXHandler::buildErrorMessage | ( | const SAXParseException & | exception | ) | throw () [protected, inherited] |
Builds an error message.
The error message includes the file name and the line/column information as supported by the given SAXParseException
| [in] | exception | The name of the currently processed file |
Definition at line 189 of file GenericSAXHandler.cpp.
| void NIImporter_OpenDrive::calcPointOnCurve | ( | SUMOReal * | ad_x, |
| SUMOReal * | ad_y, | ||
| SUMOReal | ad_centerX, | ||
| SUMOReal | ad_centerY, | ||
| SUMOReal | ad_r, | ||
| SUMOReal | ad_length | ||
| ) | throw () [static, protected] |
Definition at line 823 of file NIImporter_OpenDrive.cpp.
| void NIImporter_OpenDrive::calculateCurveCenter | ( | SUMOReal * | ad_x, |
| SUMOReal * | ad_y, | ||
| SUMOReal | ad_radius, | ||
| SUMOReal | ad_hdg | ||
| ) | throw () [static, protected] |
Definition at line 795 of file NIImporter_OpenDrive.cpp.
| Position NIImporter_OpenDrive::calculateStraightEndPoint | ( | double | hdg, |
| double | length, | ||
| const Position & | start | ||
| ) | throw () [static, protected] |
Definition at line 783 of file NIImporter_OpenDrive.cpp.
| void GenericSAXHandler::characters | ( | const XMLCh *const | chars, |
| const XERCES3_SIZE_t | length | ||
| ) | [inherited] |
The inherited method called when characters occured.
The retrieved characters are converted into a string and appended into a private buffer. They are reported as soon as the element ends.
recheck/describe what happens with characters when a new element is opened
describe characters processing in the class' head
Definition at line 172 of file GenericSAXHandler.cpp.
References GenericSAXHandler::myCharactersVector.
| void NIImporter_OpenDrive::computeShapes | ( | std::vector< OpenDriveEdge > & | edges | ) | throw () [static, protected] |
Definition at line 657 of file NIImporter_OpenDrive.cpp.
References NIImporter_OpenDrive::OpenDriveEdge::geom, NIImporter_OpenDrive::OpenDriveEdge::geometries, PositionVector::push_back_noDoublePos(), PositionVector::size(), NILoader::transformCoordinates(), NIImporter_OpenDrive::OpenDriveGeometry::type, and WRITE_ERROR.
Referenced by loadNetwork().
| void GenericSAXHandler::endElement | ( | const XMLCh *const | uri, |
| const XMLCh *const | localname, | ||
| const XMLCh *const | qname | ||
| ) | [inherited] |
The inherited method called when a tag is being closed.
This method calls the user-implemented methods myCharacters with the previously collected and converted characters.
Then, myEndElement is called, supplying it the qname converted to its enum- and string-representations.
recheck/describe encoding of the string-representation
do not generate and report the string-representation
Definition at line 122 of file GenericSAXHandler.cpp.
References GenericSAXHandler::convertTag(), GenericSAXHandler::myCharacters(), GenericSAXHandler::myCharactersVector, GenericSAXHandler::myEndElement(), GenericSAXHandler::myParentHandler, GenericSAXHandler::myParentIndicator, XMLSubSys::setHandler(), SUMO_TAG_INCLUDE, and SUMO_TAG_NOTHING.
| void GenericSAXHandler::error | ( | const SAXParseException & | exception | ) | throw (ProcessError) [inherited] |
Handler for XML-errors.
The message is built using buildErrorMessage and thrown within a ProcessError.
| [in] | exception | The occured exception to process |
| ProcessError | On any call |
Definition at line 208 of file GenericSAXHandler.cpp.
Referenced by NLHandler::getLanesFromIndices().
| void GenericSAXHandler::fatalError | ( | const SAXParseException & | exception | ) | throw (ProcessError) [inherited] |
Handler for XML-errors.
The message is built using buildErrorMessage and thrown within a ProcessError.
| ProcessError | On any call |
| [in] | exception | The occured exception to process |
Definition at line 214 of file GenericSAXHandler.cpp.
| std::vector< Position > NIImporter_OpenDrive::geomFromArc | ( | const OpenDriveEdge & | e, |
| const OpenDriveGeometry & | g | ||
| ) | throw () [static, protected] |
Definition at line 721 of file NIImporter_OpenDrive.cpp.
References C_LENGTH, SUMOReal, and UNUSED_PARAMETER.
| std::vector< Position > NIImporter_OpenDrive::geomFromLine | ( | const OpenDriveEdge & | e, |
| const OpenDriveGeometry & | g | ||
| ) | throw () [static, protected] |
Definition at line 694 of file NIImporter_OpenDrive.cpp.
References UNUSED_PARAMETER.
| std::vector< Position > NIImporter_OpenDrive::geomFromPoly | ( | const OpenDriveEdge & | e, |
| const OpenDriveGeometry & | g | ||
| ) | throw () [static, protected] |
Definition at line 774 of file NIImporter_OpenDrive.cpp.
References UNUSED_PARAMETER.
| std::vector< Position > NIImporter_OpenDrive::geomFromSpiral | ( | const OpenDriveEdge & | e, |
| const OpenDriveGeometry & | g | ||
| ) | throw () [static, protected] |
Definition at line 704 of file NIImporter_OpenDrive.cpp.
References EulerSpiral::computeSpiral(), SUMOReal, and UNUSED_PARAMETER.
| const std::string & GenericSAXHandler::getFileName | ( | ) | const throw () [inherited] |
returns the current file name
Definition at line 82 of file GenericSAXHandler.cpp.
References GenericSAXHandler::myFileName.
Referenced by NLHandler::addE1Detector(), NLHandler::addE2Detector(), NLHandler::addEdgeLaneMeanData(), NLHandler::addInstantE1Detector(), NLHandler::addRouteProbeDetector(), NLHandler::addVTypeProbeDetector(), NLHandler::beginE3Detector(), MSRouteLoader::init(), PCNetProjectionLoader::loadIfSet(), NILoader::loadXMLType(), MSTriggeredXMLReader::myInit(), RORDGenerator_ODAmounts::RORDGenerator_ODAmounts(), and GenericSAXHandler::startElement().
| NBEdge * NIImporter_OpenDrive::getIncomingDirectionalEdge | ( | const NBEdgeCont & | ec, |
| const NBNodeCont & | nc, | ||
| const std::string & | edgeID, | ||
| const std::string & | nodeID | ||
| ) | throw () [static, protected] |
Definition at line 639 of file NIImporter_OpenDrive.cpp.
References NBNode::hasIncoming().
| NBNode * NIImporter_OpenDrive::getOrBuildNode | ( | const std::string & | id, |
| Position & | pos, | ||
| NBNodeCont & | nc | ||
| ) | throw (ProcessError) [static, protected] |
Builds a node or returns the already built.
If the node is already known, it is returned. Otherwise, the node is built. If the newly built node can not be added to the container, a ProcessError is thrown. Otherwise this node is returned.
| [in] | id | The id of the node to build/get |
| in,changed] | pos The position of the node to build/get | |
| filled] | nc The node container to retrieve/add the node to |
| ProcessError | If the node could not be built/retrieved |
Definition at line 583 of file NIImporter_OpenDrive.cpp.
Referenced by loadNetwork().
| NBEdge * NIImporter_OpenDrive::getOutgoingDirectionalEdge | ( | const NBEdgeCont & | ec, |
| const NBNodeCont & | nc, | ||
| const std::string & | edgeID, | ||
| const std::string & | nodeID | ||
| ) | throw () [static, protected] |
Definition at line 621 of file NIImporter_OpenDrive.cpp.
References NBNode::hasOutgoing().
| void NIImporter_OpenDrive::loadNetwork | ( | const OptionsCont & | oc, |
| NBNetBuilder & | nb | ||
| ) | [static] |
Loads content of the optionally given SUMO file.
If the option "opendrive-files" is set, the file stored therein is read and the network definition stored therein is stored within the given network builder.
If the option "opendrive-files" is not set, this method simply returns.
The loading is done by parsing the network definition as an XML file using the SAXinterface and handling the incoming data via this class' methods.
| [in] | oc | The options to use |
| [in] | nb | The network builder to fill |
Definition at line 120 of file NIImporter_OpenDrive.cpp.
References addE2EConnectionsSecure(), addViaConnectionSecure(), computeShapes(), NIImporter_OpenDrive::OpenDriveLink::contactPoint, NIImporter_OpenDrive::OpenDriveLink::elementID, NIImporter_OpenDrive::OpenDriveLink::elementType, FileHelpers::exists(), NIImporter_OpenDrive::Connection::from, NIImporter_OpenDrive::OpenDriveEdge::from, NIImporter_OpenDrive::OpenDriveEdge::geom, NIImporter_OpenDrive::OpenDriveEdge::geometries, PositionVector::getBoxBoundary(), NBNetBuilder::getEdgeCont(), Named::getID(), NIImporter_OpenDrive::OpenDriveEdge::getMaxLaneNumber(), NBNetBuilder::getNodeCont(), getOrBuildNode(), NBTypeCont::getPriority(), NBTypeCont::getSpeed(), OptionsCont::getStringVector(), NBNetBuilder::getTypeCont(), NIImporter_OpenDrive::OpenDriveEdge::id, NBEdgeCont::insert(), NBNodeCont::insert(), OptionsCont::isUsableFileList(), NIImporter_OpenDrive::OpenDriveEdge::junction, NBEdge::L2L_VALIDATED, NIImporter_OpenDrive::OpenDriveEdge::laneSections, LANESPREAD_CENTER, LANESPREAD_RIGHT, NIImporter_OpenDrive::OpenDriveEdge::links, NIImporter_OpenDrive::OpenDriveLink::linkType, OPENDRIVE_CP_END, OPENDRIVE_CP_START, OPENDRIVE_ET_ROAD, OPENDRIVE_LT_PREDECESSOR, OPENDRIVE_LT_SUCCESSOR, OPENDRIVE_TAG_LEFT, OPENDRIVE_TAG_RIGHT, PROGRESS_BEGIN_MESSAGE, PROGRESS_DONE_MESSAGE, NBEdgeCont::retrieve(), NBNodeCont::retrieve(), PositionVector::reverse(), XMLSubSys::runParser(), GenericSAXHandler::setFileName(), setLaneConnections(), setNodeSecure(), PositionVector::size(), SUMOReal, NIImporter_OpenDrive::Connection::to, NIImporter_OpenDrive::OpenDriveEdge::to, and WRITE_ERROR.
Referenced by NILoader::load().
| void NIImporter_OpenDrive::myCharacters | ( | int | element, |
| const std::string & | chars | ||
| ) | throw (ProcessError) [protected, virtual] |
Called when characters occure.
| [in] | element | ID of the last opened element |
| [in] | chars | The read characters (complete) |
| ProcessError | If something fails |
Reimplemented from GenericSAXHandler.
Definition at line 978 of file NIImporter_OpenDrive.cpp.
References UNUSED_PARAMETER.
| void NIImporter_OpenDrive::myEndElement | ( | int | element | ) | throw (ProcessError) [protected, virtual] |
Called when a closing tag occurs.
| [in] | element | ID of the currently opened element |
| ProcessError | If something fails |
Reimplemented from GenericSAXHandler.
Definition at line 987 of file NIImporter_OpenDrive.cpp.
| void NIImporter_OpenDrive::myStartElement | ( | int | element, |
| const SUMOSAXAttributes & | attrs | ||
| ) | throw (ProcessError) [protected, virtual] |
Called on the opening of a tag;.
In dependence to the obtained type, an appropriate parsing method is called ("addEdge" if an edge encounters, f.e.).
| [in] | element | ID of the currently opened element |
| [in] | attrs | Attributes within the currently opened element |
| ProcessError | If something fails |
Reimplemented from GenericSAXHandler.
Definition at line 859 of file NIImporter_OpenDrive.cpp.
References NIImporter_OpenDrive::OpenDriveLaneSection::lanesByDir, NIImporter_OpenDrive::OpenDriveLane::predecessor, NIImporter_OpenDrive::OpenDriveLane::successor, SUMOReal, toString(), and WRITE_WARNING.
| void GenericSAXHandler::registerParent | ( | const int | tag, |
| GenericSAXHandler * | handler | ||
| ) | [inherited] |
Assigning a parent handler which is enabled when the specified tag is closed.
Definition at line 164 of file GenericSAXHandler.cpp.
References GenericSAXHandler::myParentHandler, GenericSAXHandler::myParentIndicator, and XMLSubSys::setHandler().
Referenced by NLTriggerBuilder::parseAndBuildLaneSpeedTrigger().
| void GenericSAXHandler::setFileName | ( | const std::string & | name | ) | throw () [inherited] |
Sets the current file name.
| [in] | name | The name of the currently processed file |
Definition at line 76 of file GenericSAXHandler.cpp.
Referenced by NIImporter_SUMO::_loadNetwork(), NIImporter_OpenStreetMap::_loadNetwork(), AGActivityGen::importInfoCity(), PCNetProjectionLoader::loadIfSet(), ROLoader::loadNet(), loadNet(), loadNetwork(), NIImporter_MATSim::loadNetwork(), NIImporter_ITSUMO::loadNetwork(), and NILoader::loadXMLType().
| void NIImporter_OpenDrive::setLaneConnections | ( | NIImporter_OpenDrive::Connection & | c, |
| const OpenDriveEdge & | from, | ||
| bool | fromAtBegin, | ||
| OpenDriveXMLTag | fromLaneDir, | ||
| const OpenDriveEdge & | via, | ||
| bool | viaIsReversed, | ||
| OpenDriveXMLTag | viaLaneDir, | ||
| const OpenDriveEdge & | to, | ||
| bool | fromAtEnd, | ||
| OpenDriveXMLTag | toLaneDir | ||
| ) | [static, protected] |
Definition at line 561 of file NIImporter_OpenDrive.cpp.
References NIImporter_OpenDrive::Connection::lanes, and setLaneConnections().
| void NIImporter_OpenDrive::setLaneConnections | ( | NIImporter_OpenDrive::Connection & | c, |
| const OpenDriveEdge & | from, | ||
| bool | fromAtBegin, | ||
| OpenDriveXMLTag | fromLaneDir, | ||
| const OpenDriveEdge & | to, | ||
| bool | toAtEnd, | ||
| OpenDriveXMLTag | toLaneDir | ||
| ) | [static, protected] |
Definition at line 525 of file NIImporter_OpenDrive.cpp.
References NIImporter_OpenDrive::Connection::lanes, NIImporter_OpenDrive::OpenDriveLaneSection::lanesByDir, NIImporter_OpenDrive::OpenDriveEdge::laneSections, and UNSET_CONNECTION.
Referenced by addE2EConnectionsSecure(), loadNetwork(), and setLaneConnections().
| void NIImporter_OpenDrive::setNodeSecure | ( | NBNodeCont & | nc, |
| OpenDriveEdge & | e, | ||
| const std::string & | nodeID, | ||
| NIImporter_OpenDrive::LinkType | lt | ||
| ) | throw (ProcessError) [static, protected] |
Definition at line 597 of file NIImporter_OpenDrive.cpp.
Referenced by loadNetwork().
| void GenericSAXHandler::startElement | ( | const XMLCh *const | uri, |
| const XMLCh *const | localname, | ||
| const XMLCh *const | qname, | ||
| const Attributes & | attrs | ||
| ) | [inherited] |
The inherited method called when a new tag opens.
The method parses the supplied XMLCh*-qname using the internal name/enum-map to obtain the enum representation of the attribute name.
Then, "myStartElement" is called supplying the enumeration value, the string-representation of the name and the attributes.
recheck/describe encoding of the string-representation
do not generate and report the string-representation
Definition at line 101 of file GenericSAXHandler.cpp.
References GenericSAXHandler::convertTag(), FileHelpers::getConfigurationRelative(), GenericSAXHandler::getFileName(), SUMOSAXAttributesImpl_Xerces::getString(), FileHelpers::isAbsolute(), GenericSAXHandler::myCharactersVector, GenericSAXHandler::myPredefinedTags, GenericSAXHandler::myPredefinedTagsMML, GenericSAXHandler::myStartElement(), XMLSubSys::runParser(), SUMO_ATTR_HREF, and SUMO_TAG_INCLUDE.
| void GenericSAXHandler::warning | ( | const SAXParseException & | exception | ) | throw () [inherited] |
Handler for XML-warnings.
The message is built using buildErrorMessage and reported to the warning-instance of the MsgHandler.
| [in] | exception | The occured exception to process |
Definition at line 202 of file GenericSAXHandler.cpp.
References WRITE_WARNING.
Definition at line 360 of file NIImporter_OpenDrive.h.
Definition at line 365 of file NIImporter_OpenDrive.h.
std::vector<int> NIImporter_OpenDrive::myElementStack [private] |
Definition at line 364 of file NIImporter_OpenDrive.h.
std::vector<OpenDriveEdge>& NIImporter_OpenDrive::myInnerEdges [private] |
Definition at line 362 of file NIImporter_OpenDrive.h.
std::vector<OpenDriveEdge>& NIImporter_OpenDrive::myOuterEdges [private] |
Definition at line 363 of file NIImporter_OpenDrive.h.
StringBijection< int >::Entry NIImporter_OpenDrive::openDriveAttrs [static, protected] |
{
{ "revMajor", NIImporter_OpenDrive::OPENDRIVE_ATTR_REVMAJOR },
{ "revMinor", NIImporter_OpenDrive::OPENDRIVE_ATTR_REVMINOR },
{ "id", NIImporter_OpenDrive::OPENDRIVE_ATTR_ID },
{ "length", NIImporter_OpenDrive::OPENDRIVE_ATTR_LENGTH },
{ "junction", NIImporter_OpenDrive::OPENDRIVE_ATTR_JUNCTION },
{ "elementType", NIImporter_OpenDrive::OPENDRIVE_ATTR_ELEMENTTYPE },
{ "elementId", NIImporter_OpenDrive::OPENDRIVE_ATTR_ELEMENTID },
{ "contactPoint", NIImporter_OpenDrive::OPENDRIVE_ATTR_CONTACTPOINT },
{ "s", NIImporter_OpenDrive::OPENDRIVE_ATTR_S },
{ "x", NIImporter_OpenDrive::OPENDRIVE_ATTR_X },
{ "y", NIImporter_OpenDrive::OPENDRIVE_ATTR_Y },
{ "hdg", NIImporter_OpenDrive::OPENDRIVE_ATTR_HDG },
{ "curvStart", NIImporter_OpenDrive::OPENDRIVE_ATTR_CURVSTART },
{ "curvEnd", NIImporter_OpenDrive::OPENDRIVE_ATTR_CURVEND },
{ "curvature", NIImporter_OpenDrive::OPENDRIVE_ATTR_CURVATURE },
{ "a", NIImporter_OpenDrive::OPENDRIVE_ATTR_A },
{ "b", NIImporter_OpenDrive::OPENDRIVE_ATTR_B },
{ "c", NIImporter_OpenDrive::OPENDRIVE_ATTR_C },
{ "d", NIImporter_OpenDrive::OPENDRIVE_ATTR_D },
{ "type", NIImporter_OpenDrive::OPENDRIVE_ATTR_TYPE },
{ "level", NIImporter_OpenDrive::OPENDRIVE_ATTR_LEVEL },
{ "", NIImporter_OpenDrive::OPENDRIVE_ATTR_NOTHING }
}
The names of openDrive-XML attributes (for passing to GenericSAXHandler)
Definition at line 439 of file NIImporter_OpenDrive.h.
StringBijection< int >::Entry NIImporter_OpenDrive::openDriveTags [static, protected] |
{
{ "header", NIImporter_OpenDrive::OPENDRIVE_TAG_HEADER },
{ "road", NIImporter_OpenDrive::OPENDRIVE_TAG_ROAD },
{ "predecessor", NIImporter_OpenDrive::OPENDRIVE_TAG_PREDECESSOR },
{ "successor", NIImporter_OpenDrive::OPENDRIVE_TAG_SUCCESSOR },
{ "geometry", NIImporter_OpenDrive::OPENDRIVE_TAG_GEOMETRY },
{ "line", NIImporter_OpenDrive::OPENDRIVE_TAG_LINE },
{ "spiral", NIImporter_OpenDrive::OPENDRIVE_TAG_SPIRAL },
{ "arc", NIImporter_OpenDrive::OPENDRIVE_TAG_ARC },
{ "poly3", NIImporter_OpenDrive::OPENDRIVE_TAG_POLY3 },
{ "laneSection", NIImporter_OpenDrive::OPENDRIVE_TAG_LANESECTION },
{ "left", NIImporter_OpenDrive::OPENDRIVE_TAG_LEFT },
{ "center", NIImporter_OpenDrive::OPENDRIVE_TAG_CENTER },
{ "right", NIImporter_OpenDrive::OPENDRIVE_TAG_RIGHT },
{ "lane", NIImporter_OpenDrive::OPENDRIVE_TAG_LANE },
{ "", NIImporter_OpenDrive::OPENDRIVE_TAG_NOTHING }
}
The names of openDrive-XML elements (for passing to GenericSAXHandler)
Definition at line 436 of file NIImporter_OpenDrive.h.