23 #ifndef NIImporter_OpenStreetMap_h 24 #define NIImporter_OpenStreetMap_h 85 NIOSMNode(
long long int _id,
double _lon,
double _lat)
93 const long long int id;
149 explicit Edge(
long long int _id)
156 myCurrentIsRoad(false),
157 myCurrentIsPlatform(false) { }
161 const long long int id;
223 std::map<long long int, NIOSMNode*>
myOSMNodes;
271 const std::vector<long long int>& passed,
NBNetBuilder& nb);
277 std::map<NBNode*, std::pair<double, double> >
325 void myEndElement(
int element)
override;
374 EdgesHandler(
const std::map<long long int, NIOSMNode*>& osmNodes,
375 std::map<long long int, Edge*>& toFill, std::map<long long int, Edge*>& platformShapes);
402 void myEndElement(
int element)
override;
447 const std::map<long long int, Edge*>& osmEdges,
NBPTStopCont* nbptStopCont,
448 const std::map<long long int, Edge*>& platfromShapes,
NBPTLineCont* nbptLineCont,
476 void myEndElement(
int element)
override;
536 bool checkEdgeRef(
long long int ref)
const;
539 bool applyRestriction()
const;
542 NBEdge* findEdgeRef(
long long int wayRef,
const std::vector<NBEdge*>& candidates)
const;
const std::map< long long int, NIOSMNode * > & myOSMNodes
The previously parsed nodes.
An internal definition of a loaded edge.
const bool myImportElevation
whether elevation data should be imported
const std::map< long long int, Edge * > & myOSMEdges
The previously parsed edges.
std::map< long long int, Edge * > & myPlatformShapesMap
A map of built edges.
The only invalid connection is declared.
An internal representation of an OSM-node.
const long long int id
The edge's id.
std::string streetName
The edge's street name.
NBPTLineCont * myNBPTLineCont
PT Line container to be filled.
RestrictionType myRestrictionType
const std::map< long long int, NIOSMNode * > & myOSMNodes
The previously parsed nodes.
const long long int id
The node's id.
The only valid connection is declared.
WayType myBuswayType
Information about the kind of busway along this road.
long long int myFromWay
the origination way for the current restriction
vehicle is a not electrified rail
A container for traffic light definitions and built programs.
std::string myRef
ref of the pt line
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...
NIImporter_OpenStreetMap()
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
The representation of a single edge during network building.
long long int myCurrentRelation
The currently parsed relation.
NIOSMNode(long long int _id, double _lon, double _lat)
std::vector< NIIPTPlatform > myPlatforms
bus stop platforms
std::vector< long long int > myStops
bus stop references
SAX-handler base for SUMO-files.
std::vector< long long int > myCurrentNodes
The list of nodes this edge is made of.
RestrictionType
whether the only allowed or the only forbidden connection is defined
std::set< NIOSMNode *, CompareNodes > & myUniqueNodes
the set of unique nodes (used for duplicate detection/substitution)
NBNode * node
the NBNode that was instantiated
std::vector< long long int > myWays
ways in pt line references
const OptionsCont & myOptionsCont
the options cont
static void loadNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Loads content of the optionally given OSM file.
Functor which compares two Edges.
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 ...
const std::map< long long int, Edge * > & myPlatformShapes
The previously parsed platform shapes.
friend class NodesHandler
void load(const OptionsCont &oc, NBNetBuilder &nb)
std::string myName
name of the relation
A class which extracts OSM-edges from a parsed OSM-file.
int insertEdge(Edge *e, int index, NBNode *from, NBNode *to, const std::vector< long long int > &passed, NBNetBuilder &nb)
Builds an NBEdge.
double ele
The elevation of this node.
std::vector< int > myParentElements
The element stack.
bool ptStopPosition
Whether this is a public transport stop position.
Encapsulated SAX-Attributes.
bool operator()(const NIOSMNode *n1, const NIOSMNode *n2) const
Storage for edges, including some functionality operating on multiple edges.
NIOSMNode & operator=(const NIOSMNode &s)=delete
invalidated assignment operator
int myParkingType
Information about road-side parking.
long long int myLastNodeID
ID of the currently parsed node, for reporting mainly.
std::map< long long int, NIOSMNode * > & myToFill
The nodes container to fill.
bool myIsRestriction
whether the currently parsed relation is a restriction
~NIImporter_OpenStreetMap()
An upper class for objects with additional parameters.
bool railwayCrossing
Whether this is a railway crossing.
double myMaxSpeed
maximum speed in km/h, or MAXSPEED_UNGIVEN
bool myIsInValidNodeTag
Hierarchy helper for parsing a node's tags.
std::map< long long int, Edge * > myEdges
the map from OSM way ids to edge objects
const double lat
The latitude the node is located at.
int myNoLanes
number of lanes, or -1 if unknown
bool tlsControlled
Whether this is a tls controlled junction.
std::map< std::string, std::string > myKnownCompoundTypes
The compound types that have already been mapped to other known types.
std::map< long long int, Edge * > & myEdgeMap
A map of built edges.
bool myCurrentIsPlatform
Information whether this is a pt platform.
long long int myToWay
the destination way for the current restriction
bool myIsRoute
indicates whether current relation is a route
int myLayer
Information about the relative z-ordering of ways.
Instance responsible for building networks.
std::string myPTRouteType
indicates whether current relation is a pt route
static const std::string compoundTypeSeparator
The separator within newly created compound type names.
A storage for options typed value containers)
long long int myViaNode
the via node/way for the current restriction
void reconstructLayerElevation(double layerElevation, NBNetBuilder &nb)
reconstruct elevation from layer info
std::string name
The name of the node.
A class which extracts OSM-nodes from a parsed OSM-file.
Represents a single node (junction) during network building.
NBNode * insertNodeChecking(long long int id, NBNodeCont &nc, NBTrafficLightLogicCont &tlsc)
Builds an NBNode.
int myHierarchyLevel
The current hierarchy level.
std::string myHighWayType
The type, stored in "highway" key.
const double lon
The longitude the node is located at.
Importer for networks stored in OpenStreetMap format.
bool myIsStopArea
indicates whether current relation is a pt stop area
static const long long int INVALID_ID
bool myCurrentIsRoad
Information whether this is a road.
Edge * myCurrentEdge
The currently built edge.
std::map< long long int, Edge * > myPlatformShapes
the map from OSM way ids to platform shapes
std::set< std::string > myUnusableTypes
The compounds types that do not contain known types.
SVCPermissions permissions
type of pt stop
Container for nodes during the netbuilding process.
double ptStopLength
The length of the pt stop.
std::map< long long int, NIOSMNode * > myOSMNodes
the map from OSM node ids to actual nodes
std::vector< int > myParentElements
The element stack.
Functor which compares two NIOSMNodes according to their coordinates.
std::set< NIOSMNode *, CompareNodes > myUniqueNodes
the set of unique nodes used in NodesHandler, used when freeing memory
static const double MAXSPEED_UNGIVEN
const OptionsCont & myOptionsCont
the options
A class which extracts relevant relation information from a parsed OSM-file.
std::string myIsOneWay
Information whether this is an one-way road.
std::map< std::string, double > mySpeedMap
A map of non-numeric speed descriptions to their numeric values.
A storage for available types of edges.
NBPTStopCont * myNBPTStopCont
The previously filled pt stop container.