pub struct RawRoad {
pub osm_center_points: Vec<Pt2D, Global>,
pub osm_tags: Tags,
pub turn_restrictions: Vec<(RestrictionType, OriginalRoad), Global>,
pub complicated_turn_restrictions: Vec<(OriginalRoad, OriginalRoad), Global>,
pub percent_incline: f64,
pub crosswalk_forward: bool,
pub crosswalk_backward: bool,
pub barrier_nodes: Vec<Pt2D, Global>,
pub lane_specs_ltr: Vec<LaneSpec, Global>,
}
Fields
osm_center_points: Vec<Pt2D, Global>
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), Global>
complicated_turn_restrictions: Vec<(OriginalRoad, OriginalRoad), Global>
(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
barrier_nodes: Vec<Pt2D, Global>
Barrier nodes along this road’s original center line.
lane_specs_ltr: Vec<LaneSpec, Global>
Derived from osm_tags. Not automatically updated.
Implementations
impl RawRoad
impl RawRoad
pub fn new(
osm_center_points: Vec<Pt2D, Global>,
osm_tags: Tags,
config: &MapConfig
) -> Result<RawRoad, Error>
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
pub 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
impl<'de> Deserialize<'de> for RawRoad
impl<'de> Deserialize<'de> for RawRoad
fn deserialize<__D>(
__deserializer: __D
) -> Result<RawRoad, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<RawRoad, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Serialize for RawRoad
impl Serialize for RawRoad
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. 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>
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