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, }
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?
Implementations
impl Intersection
[src]
impl Intersection
[src]pub fn is_border(&self) -> bool
[src]
pub fn is_incoming_border(&self) -> bool
[src]
pub fn is_outgoing_border(&self) -> bool
[src]
pub fn is_closed(&self) -> bool
[src]
pub fn is_stop_sign(&self) -> bool
[src]
pub fn is_traffic_signal(&self) -> bool
[src]
pub fn is_light_rail(&self, map: &Map) -> bool
[src]
pub fn is_private(&self, map: &Map) -> bool
[src]
pub fn is_footway(&self, map: &Map) -> bool
[src]
pub fn is_cycleway(&self, map: &Map) -> bool
[src]
pub fn get_incoming_lanes(
&self,
map: &Map,
constraints: PathConstraints
) -> Vec<LaneID>
[src]
&self,
map: &Map,
constraints: PathConstraints
) -> Vec<LaneID>
pub fn get_outgoing_lanes(
&self,
map: &Map,
constraints: PathConstraints
) -> Vec<LaneID>
[src]
&self,
map: &Map,
constraints: PathConstraints
) -> Vec<LaneID>
Strict for bikes. If there are bike lanes, not allowed to use other lanes.
pub fn get_zorder(&self, map: &Map) -> isize
[src]
pub fn get_rank(&self, map: &Map) -> RoadRank
[src]
pub fn get_roads_sorted_by_incoming_angle(
&self,
all_roads: &[Road]
) -> Vec<RoadID>
[src]
&self,
all_roads: &[Road]
) -> Vec<RoadID>
pub fn get_sorted_incoming_roads(&self, map: &Map) -> Vec<RoadID>
[src]
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).
pub fn some_outgoing_road(&self, map: &Map) -> Option<DirectedRoadID>
[src]
pub fn some_incoming_road(&self, map: &Map) -> Option<DirectedRoadID>
[src]
pub fn name(&self, lang: Option<&String>, map: &Map) -> String
[src]
Trait Implementations
impl<'de> Deserialize<'de> for Intersection
[src]
impl<'de> Deserialize<'de> for Intersection
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Intersection
[src]
impl Serialize for Intersection
[src]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
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,