Expand description
OverpassImporter
is a struct that implements the RailwayGraphImporter
trait for importing
railway graph data from the Overpass API.
Structs
- A
Coordinate
represents a geographic coordinate with latitude and longitude. OverpassImporter
is a struct that implements theRailwayGraphImporter
trait for importing railway graph data from the Overpass API.- Represents an element of a railway network.
Enums
- Represents the type of a
RailwayElement
.
Functions
- Calculate the total length of a sequence of coordinates by summing the distance between consecutive coordinates.
- Counts the number of
Node
elements in a given vector ofRailwayElement
s. - Counts the number of
Way
elements in a vector ofRailwayElement
s. - Create a vector of
RailwayNode
s from the providedRailwayElement
s. - Create railway nodes from two railway elements that share a node ID but do not have an existing common node. The nodes are created by finding the two coordinates in the geometries of the two railway elements that are closest to each other.
- Find the next existing node ID and its index in the
node_indices
HashMap after the givenstart
ID. - Create a
RailwayGraph
from a vector ofRailwayElement
s.