[][src]Struct map_model::Intersection

pub struct Intersection {
    pub id: IntersectionID,
    pub polygon: Polygon,
    pub turns: BTreeSet<TurnID>,
    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: IntersectionIDpolygon: Polygon

This needs to be in clockwise orientation, or later rendering of sidewalk corners breaks.

turns: BTreeSet<TurnID>elevation: Distanceintersection_type: IntersectionTypeorig_id: NodeIDincoming_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]

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]

pub fn get_outgoing_lanes(
    &self,
    map: &Map,
    constraints: PathConstraints
) -> Vec<LaneID>
[src]

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: &Vec<Road>
) -> Vec<RoadID>
[src]

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 Debug for Intersection[src]

impl<'de> Deserialize<'de> for Intersection[src]

impl Serialize for Intersection[src]

Auto Trait Implementations

impl RefUnwindSafe for Intersection[src]

impl Send for Intersection[src]

impl Sync for Intersection[src]

impl Unpin for Intersection[src]

impl UnwindSafe for Intersection[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,