Struct map_model::Intersection [−][src]
pub struct Intersection { pub id: IntersectionID, pub polygon: Polygon, pub turns: Vec<Turn>, pub elevation: Distance, pub intersection_type: IntersectionType, pub orig_id: NodeID, pub incoming_lanes: Vec<LaneID>, pub outgoing_lanes: Vec<LaneID>, pub roads: BTreeSet<RoadID>, pub merged: bool, pub movements: BTreeMap<MovementID, Movement>, }
Expand description
An intersection connects roads. Most have >2 roads and are controlled by stop signs or traffic signals. Roads that lead to the boundary of the map end at border intersections, with only that one road attached.
Fields
id: IntersectionID
polygon: Polygon
This needs to be in clockwise orientation, or later rendering of sidewalk corners breaks.
turns: Vec<Turn>
elevation: Distance
intersection_type: IntersectionType
orig_id: NodeID
incoming_lanes: Vec<LaneID>
Note that a lane may belong to both incoming_lanes and outgoing_lanes.
outgoing_lanes: Vec<LaneID>
roads: BTreeSet<RoadID>
merged: bool
Was a short road adjacent to this intersection merged?
movements: BTreeMap<MovementID, Movement>
Implementations
Strict for bikes. If there are bike lanes, not allowed to use other lanes.
Higher numbers get drawn on top
Return all incoming roads to an intersection, sorted by angle. This skips one-way roads outbound from the intersection, since no turns originate from those anyway. This allows heuristics for a 3-way intersection to not care if one of the roads happens to be a dual carriageway (split into two one-ways).
Don’t call for SharedSidewalkCorners
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Intersection
impl Send for Intersection
impl Sync for Intersection
impl Unpin for Intersection
impl UnwindSafe for Intersection
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self