21 #ifndef NIImporter_OpenStreetMap_h 22 #define NIImporter_OpenStreetMap_h 79 NIOSMNode(
long long int _id,
double _lon,
double _lat)
92 const long long int id;
156 explicit Edge(
long long int _id)
165 myCurrentIsRoad(false),
166 myCurrentIsPlatform(false),
167 myCurrentIsElectrified(false)
172 const long long int id;
242 std::map<long long int, NIOSMNode*>
myOSMNodes;
290 const std::vector<long long int>& passed,
NBNetBuilder& nb);
296 std::map<NBNode*, std::pair<double, double> >
354 void myEndElement(
int element)
override;
403 EdgesHandler(
const std::map<long long int, NIOSMNode*>& osmNodes,
404 std::map<long long int, Edge*>& toFill, std::map<long long int, Edge*>& platformShapes);
431 void myEndElement(
int element)
override;
479 const std::map<long long int, Edge*>& osmEdges,
NBPTStopCont* nbptStopCont,
480 const std::map<long long int, Edge*>& platfromShapes,
NBPTLineCont* nbptLineCont,
508 void myEndElement(
int element)
override;
568 bool checkEdgeRef(
long long int ref)
const;
571 bool applyRestriction()
const;
574 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()
void extendRailwayDistances(Edge *e, NBTypeCont &tc)
extend kilometrage data for all nodes along railway
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.
bool myCurrentIsElectrified
Information whether this is railway is electrified.
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
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 ...
SAX-handler base for SUMO-files.
std::vector< long long int > myCurrentNodes
The list of nodes this edge is made of.
bool railwaySignal
Whether this is a railway (main) signal.
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
bool myAllAttributes
whether additional way attributes shall be added to the edge
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
std::string position
kilometrage/mileage
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.
std::string ref
The edge's track name.
int myNoLanes
number of lanes, or -1 if unknown
bool railwayBufferStop
Whether this is a railway buffer stop.
double positionMeters
position converted to m (using highest precision available)
bool tlsControlled
Whether this is a tls controlled junction.
WayType mySidewalkType
Information about the kind of sidwalk along this road.
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.
static double interpretDistance(NIOSMNode *node)
read distance value from node and return value in m
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.
int myInterval
service interval of the pt line in minutes
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.
std::string myNightService
night service information of the pt line
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.
WayType myRailDirection
Information about the direction(s) of railway usage.
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.