pub struct RawRoad {
pub center_points: Vec<Pt2D>,
pub scale_width: f64,
pub osm_tags: Tags,
pub turn_restrictions: Vec<(RestrictionType, OriginalRoad)>,
pub complicated_turn_restrictions: Vec<(OriginalRoad, OriginalRoad)>,
pub percent_incline: f64,
pub crosswalk_forward: bool,
pub crosswalk_backward: bool,
}
Fields
center_points: Vec<Pt2D>
This is effectively a PolyLine, except there’s a case where we need to plumb forward cul-de-sac roads for roundabout handling. No transformation of these points whatsoever has happened.
scale_width: f64
Multiply the width of each lane by this ratio, to prevent overlapping roads.
turn_restrictions: Vec<(RestrictionType, OriginalRoad)>
complicated_turn_restrictions: Vec<(OriginalRoad, OriginalRoad)>
(via, to). For turn restrictions where ‘via’ is an entire road. Only BanTurns.
percent_incline: f64
crosswalk_forward: bool
Is there a tagged crosswalk near each end of the road?
crosswalk_backward: bool
Implementations
sourceimpl RawRoad
impl RawRoad
pub fn new(osm_center_points: Vec<Pt2D>, osm_tags: Tags) -> Self
pub fn is_light_rail(&self) -> bool
pub fn is_footway(&self) -> bool
pub fn is_service(&self) -> bool
pub fn is_cycleway(&self, cfg: &MapConfig) -> bool
pub fn is_driveable(&self, cfg: &MapConfig) -> bool
pub fn is_oneway(&self) -> bool
pub fn length(&self) -> Distance
pub fn get_zorder(&self) -> isize
Trait Implementations
sourceimpl<'de> Deserialize<'de> for RawRoad
impl<'de> Deserialize<'de> for RawRoad
sourcefn 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
impl StructuralPartialEq for RawRoad
Auto Trait Implementations
impl RefUnwindSafe for RawRoad
impl Send for RawRoad
impl Sync for RawRoad
impl Unpin for RawRoad
impl UnwindSafe for RawRoad
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more