24 #ifndef NIImporter_OpenStreetMap_h 25 #define NIImporter_OpenStreetMap_h 85 NIOSMNode(
long long int _id,
double _lon,
double _lat) :
89 const long long int id;
136 myCurrentIsRoad(false) {}
139 const long long int id;
196 std::map<long long int, NIOSMNode*>
myOSMNodes;
241 const std::vector<long long int>& passed,
NBNetBuilder& nb);
293 void myEndElement(
int element);
343 EdgesHandler(
const std::map<long long int, NIOSMNode*>& osmNodes,
344 std::map<long long int, Edge*>& toFill);
371 void myEndElement(
int element);
413 const std::map<long long int, Edge*>& osmEdges);
440 void myEndElement(
int element);
488 bool checkEdgeRef(
long long int ref)
const;
491 bool applyRestriction()
const;
494 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.
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.
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
A container for traffic light definitions and built programs.
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...
bool ptStopPostion
Whether this is a public transport stop position.
NIImporter_OpenStreetMap()
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)
NIOSMNode & operator=(const NIOSMNode &s)
invalidated assignment operator
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
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 ...
friend class NodesHandler
void load(const OptionsCont &oc, NBNetBuilder &nb)
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.
Encapsulated SAX-Attributes.
bool operator()(const NIOSMNode *n1, const NIOSMNode *n2) const
Storage for edges, including some functionality operating on multiple edges.
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.
long long int myToWay
the destination way for the current restriction
int myLayer
Information about the relative z-ordering of ways.
Instance responsible for building networks.
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.
static const long long int INVALID_ID
bool myCurrentIsRoad
Information whether this is a road.
Edge * myCurrentEdge
The currently built edge.
std::set< std::string > myUnusableTypes
The compounds types that do not contain known types.
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.