Struct map_model::Lane [−][src]
pub struct Lane { pub id: LaneID, pub lane_type: LaneType, pub lane_center_pts: PolyLine, pub width: Distance, pub dir: Direction, pub src_i: IntersectionID, pub dst_i: IntersectionID, pub bus_stops: BTreeSet<BusStopID>, pub driving_blackhole: bool, pub biking_blackhole: bool, }
Expand description
A road segment is broken down into individual lanes, which have a LaneType.
Fields
id: LaneID
lane_type: LaneType
lane_center_pts: PolyLine
width: Distance
dir: Direction
src_i: IntersectionID
dst_i: IntersectionID
bus_stops: BTreeSet<BusStopID>
Meaningless order
driving_blackhole: bool
{Cars, bikes} trying to start or end here might not be able to reach most lanes in the graph, because this is near a border.
biking_blackhole: bool
Implementations
pt2 will be endpoint
Returns the set of allowed turn types, based on individual turn lane restrictions. None
means all turn types are allowed.
This will return None
for bus lanes, unless force_bus
is true. OSM turn restrictions on
bus lanes usually apply to regular vehicles, not the buses. When generating the turns for
buses, we probably don’t want to use the restrictions.
Starting from this lane, follow the lane’s left edge to the intersection, continuing to “walk around the block” until we reach the starting point. This only makes sense for the outermost lanes on a road. Returns the polygon and all visited lanes.
TODO This process currently fails for some starting positions; orienting is weird.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Lane
impl UnwindSafe for Lane
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