pub struct RawRoad {
pub osm_center_points: Vec<Pt2D>,
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,
pub lane_specs_ltr: Vec<LaneSpec>,
}
Fields
osm_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.
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
lane_specs_ltr: Vec<LaneSpec>
Derived from osm_tags. Not automatically updated.
Implementations
sourceimpl RawRoad
impl RawRoad
pub fn new(
osm_center_points: Vec<Pt2D>,
osm_tags: Tags,
config: &MapConfig
) -> Result<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) -> bool
pub fn is_driveable(&self) -> bool
pub fn oneway_for_driving(&self) -> Option<Direction>
pub fn length(&self) -> Distance
pub fn get_zorder(&self) -> isize
sourcepub fn untrimmed_road_geometry(&self) -> (PolyLine, Distance)
pub fn untrimmed_road_geometry(&self) -> (PolyLine, Distance)
Returns the corrected (but untrimmed) center and total width for a road
pub fn osm_url(&self) -> String
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 · sourcefn borrow_mut(&mut self) -> &mut T
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more