75 NIOSMNode(
long long int _id,
double _lon,
double _lat)
88 const long long int id;
159 explicit Edge(
long long int _id) :
177 const long long int id;
298 const std::vector<long long int>& passed,
NBNetBuilder& nb);
304 std::map<NBNode*, std::pair<double, double> >
416 EdgesHandler(
const std::map<long long int, NIOSMNode*>& osmNodes,
417 std::map<long long int, Edge*>& toFill, std::map<long long int, Edge*>& platformShapes);
493 const std::map<long long int, Edge*>& osmEdges,
NBPTStopCont* nbptStopCont,
494 const std::map<long long int, Edge*>& platfromShapes,
NBPTLineCont* nbptLineCont,
587 NBEdge*
findEdgeRef(
long long int wayRef,
const std::vector<NBEdge*>& candidates)
const;
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_IGNORING
vehicles ignoring classes
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
Storage for edges, including some functionality operating on multiple edges.
The representation of a single edge during network building.
Instance responsible for building networks.
Container for nodes during the netbuilding process.
Represents a single node (junction) during network building.
A container for traffic light definitions and built programs.
A storage for available edgeTypes of edges.
Functor which compares two Edges.
Functor which compares two NIOSMNodes according to their coordinates.
bool operator()(const NIOSMNode *n1, const NIOSMNode *n2) const
An internal definition of a loaded edge.
WayType mySidewalkType
Information about the kind of sidwalk along this road.
bool myCurrentIsPlatform
Information whether this is a pt platform.
bool myCurrentIsRoad
Information whether this is a road.
WayType myCyclewayType
Information about the kind of cycleway along this road.
int myNoLanesForward
number of lanes in forward direction or 0 if unknown, negative if backwards lanes are meant
double myMaxSpeed
maximum speed in km/h, or MAXSPEED_UNGIVEN
bool myCurrentIsElectrified
Information whether this is railway is electrified.
std::string ref
The edge's track name.
std::string myHighWayType
The type, stored in "highway" key.
const long long int id
The edge's id.
int myLayer
Information about the relative z-ordering of ways.
Edge & operator=(const Edge &s)=delete
invalidated assignment operator
int myNoLanes
number of lanes, or -1 if unknown
std::vector< long long int > myCurrentNodes
The list of nodes this edge is made of.
int myParkingType
Information about road-side parking.
double myMaxSpeedBackward
maximum speed in km/h, or MAXSPEED_UNGIVEN
WayType myBuswayType
Information about the kind of busway along this road.
std::string streetName
The edge's street name.
WayType myRailDirection
Information about the direction(s) of railway usage.
std::string myIsOneWay
Information whether this is an one-way road.
A class which extracts OSM-edges from a parsed OSM-file.
Edge * myCurrentEdge
The currently built edge.
const std::map< long long int, NIOSMNode * > & myOSMNodes
The previously parsed nodes.
EdgesHandler(const std::map< long long int, NIOSMNode * > &osmNodes, std::map< long long int, Edge * > &toFill, std::map< long long int, Edge * > &platformShapes)
Constructor.
~EdgesHandler() override
Destructor.
bool myAllAttributes
whether additional way attributes shall be added to the edge
void myEndElement(int element) override
Called when a closing tag occurs.
EdgesHandler & operator=(const EdgesHandler &s)
invalidated assignment operator
double interpretSpeed(const std::string &key, std::string value)
EdgesHandler(const EdgesHandler &s)
invalidated copy constructor
std::map< long long int, Edge * > & myEdgeMap
A map of built edges.
std::map< long long int, Edge * > & myPlatformShapesMap
A map of built edges.
std::map< std::string, double > mySpeedMap
A map of non-numeric speed descriptions to their numeric values.
std::vector< int > myParentElements
The element stack.
void myStartElement(int element, const SUMOSAXAttributes &attrs) override
Called on the opening of a tag;.
A class which extracts OSM-nodes from a parsed OSM-file.
int myHierarchyLevel
The current hierarchy level.
~NodesHandler() override
Destructor.
bool myIsInValidNodeTag
Hierarchy helper for parsing a node's tags.
const bool myImportElevation
whether elevation data should be imported
int getDuplicateNodes() const
NodesHandler(const NodesHandler &s)
invalidated copy constructor
std::set< NIOSMNode *, CompareNodes > & myUniqueNodes
the set of unique nodes (used for duplicate detection/substitution)
void myStartElement(int element, const SUMOSAXAttributes &attrs) override
Called on the opening of a tag;.
std::map< long long int, NIOSMNode * > & myToFill
The nodes container to fill.
NodesHandler(std::map< long long int, NIOSMNode * > &toFill, std::set< NIOSMNode *, CompareNodes > &uniqueNodes, const OptionsCont &cont)
Contructor.
long long int myLastNodeID
ID of the currently parsed node, for reporting mainly.
const OptionsCont & myOptionsCont
the options
void myEndElement(int element) override
Called when a closing tag occurs.
int myDuplicateNodes
number of diplic
NodesHandler & operator=(const NodesHandler &s)
invalidated assignment operator
A class which extracts relevant relation information from a parsed OSM-file.
void myEndElement(int element) override
Called when a closing tag occurs.
const std::map< long long int, Edge * > & myPlatformShapes
The previously parsed platform shapes.
RelationHandler & operator=(const RelationHandler &s)
invalidated assignment operator
long long int myViaNode
the via node/way for the current restriction
bool myIsRestriction
whether the currently parsed relation is a restriction
std::vector< long long int > myWays
ways in pt line references
long long int myCurrentRelation
The currently parsed relation.
RestrictionType myRestrictionType
void resetValues()
reset members to their defaults for parsing a new relation
void myStartElement(int element, const SUMOSAXAttributes &attrs) override
Called on the opening of a tag;.
const std::map< long long int, NIOSMNode * > & myOSMNodes
The previously parsed nodes.
const OptionsCont & myOptionsCont
the options cont
RestrictionType
whether the only allowed or the only forbidden connection is defined
@ RESTRICTION_UNKNOWN
The relation tag was missing.
@ RESTRICTION_NO
The only invalid connection is declared.
@ RESTRICTION_ONLY
The only valid connection is declared.
std::string myNightService
night service information of the pt line
std::string myPTRouteType
indicates whether current relation is a pt route
~RelationHandler() override
Destructor.
std::vector< long long int > myStops
bus stop references
NBPTLineCont * myNBPTLineCont
PT Line container to be filled.
std::vector< NIIPTPlatform > myPlatforms
bus stop platforms
bool myIsStopArea
indicates whether current relation is a pt stop area
bool myIsRoute
indicates whether current relation is a route
std::string myName
name of the relation
std::string myRef
ref of the pt line
std::vector< int > myParentElements
The element stack.
RelationHandler(const std::map< long long int, NIOSMNode * > &osmNodes, const std::map< long long int, Edge * > &osmEdges, NBPTStopCont *nbptStopCont, const std::map< long long int, Edge * > &platfromShapes, NBPTLineCont *nbptLineCont, const OptionsCont &oc)
Constructor.
int myInterval
service interval of the pt line in minutes
RelationHandler(const RelationHandler &s)
invalidated copy constructor
NBPTStopCont * myNBPTStopCont
The previously filled pt stop container.
bool checkEdgeRef(long long int ref) const
check whether a referenced way has a corresponding edge
long long int myFromWay
the origination way for the current restriction
long long int myToWay
the destination way for the current restriction
bool applyRestriction() const
try to apply the parsed restriction and return whether successful
NBEdge * findEdgeRef(long long int wayRef, const std::vector< NBEdge * > &candidates) const
try to find the way segment among candidates
const std::map< long long int, Edge * > & myOSMEdges
The previously parsed edges.
Importer for networks stored in OpenStreetMap format.
int insertEdge(Edge *e, int index, NBNode *from, NBNode *to, const std::vector< long long int > &passed, NBNetBuilder &nb)
Builds an NBEdge.
std::map< long long int, Edge * > myEdges
the map from OSM way ids to edge objects
std::map< long long int, NIOSMNode * > myOSMNodes
the map from OSM node ids to actual nodes
NIImporter_OpenStreetMap()
static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Loads content of the optionally given OSM file.
static const long long int INVALID_ID
static const double MAXSPEED_UNGIVEN
std::map< long long int, std::set< long long int > > myStopAreas
the map from stop_area relations to member node
~NIImporter_OpenStreetMap()
std::map< long long int, Edge * > myPlatformShapes
the map from OSM way ids to platform shapes
void load(const OptionsCont &oc, NBNetBuilder &nb)
std::set< NIOSMNode *, CompareNodes > myUniqueNodes
the set of unique nodes used in NodesHandler, used when freeing memory
void reconstructLayerElevation(double layerElevation, NBNetBuilder &nb)
reconstruct elevation from layer info
static SUMOVehicleClass interpretTransportType(const std::string &type, NIOSMNode *toSet=nullptr)
translate osm transport designations into sumo vehicle class
std::map< std::string, std::string > myKnownCompoundTypes
The compound types that have already been mapped to other known types.
static const std::string compoundTypeSeparator
The separator within newly created compound type names.
std::set< std::string > myUnusableTypes
The compounds types that do not contain known types.
std::map< NBNode *, std::pair< double, double > > getNeighboringNodes(NBNode *node, double maxDist, const std::set< NBNode * > &knownElevation)
collect neighboring nodes with their road distance and maximum between-speed. Search does not continu...
static double interpretDistance(NIOSMNode *node)
read distance value from node and return value in m
NBNode * insertNodeChecking(long long int id, NBNodeCont &nc, NBTrafficLightLogicCont &tlsc)
Builds an NBNode.
void extendRailwayDistances(Edge *e, NBTypeCont &tc)
extend kilometrage data for all nodes along railway
std::string usableType(const std::string &type, const std::string &id, NBTypeCont &tc)
check whether the type is known or consists of known type compounds. return empty string otherwise
A storage for options typed value containers)
An upper class for objects with additional parameters.
Encapsulated SAX-Attributes.
SAX-handler base for SUMO-files.
An internal representation of an OSM-node.
SVCPermissions permissions
type of pt stop
NBNode * node
the NBNode that was instantiated
double positionMeters
position converted to m (using highest precision available)
std::string position
kilometrage/mileage
const long long int id
The node's id.
NIOSMNode & operator=(const NIOSMNode &s)=delete
invalidated assignment operator
bool tlsControlled
Whether this is a tls controlled junction.
double ptStopLength
The length of the pt stop.
NIOSMNode(long long int _id, double _lon, double _lat)
bool ptStopPosition
Whether this is a public transport stop position.
std::string name
The name of the node.
bool railwayCrossing
Whether this is a railway crossing.
double ele
The elevation of this node.
bool railwayBufferStop
Whether this is a railway buffer stop.
const double lon
The longitude the node is located at.
const double lat
The latitude the node is located at.
bool railwaySignal
Whether this is a railway (main) signal.