Struct raw_map::StreetNetwork
[−]pub struct StreetNetwork {
pub roads: BTreeMap<OriginalRoad, RawRoad>,
pub intersections: BTreeMap<NodeID, RawIntersection>,
pub boundary_polygon: Polygon,
pub gps_bounds: GPSBounds,
pub config: MapConfig,
}
Fields
roads: BTreeMap<OriginalRoad, RawRoad>
intersections: BTreeMap<NodeID, RawIntersection>
boundary_polygon: Polygon
gps_bounds: GPSBounds
config: MapConfig
Implementations
impl StreetNetwork
impl StreetNetwork
impl StreetNetwork
impl StreetNetwork
pub fn find_traffic_signal_clusters(&mut self) -> Vec<OriginalRoad, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn find_traffic_signal_clusters(&mut self) -> Vec<OriginalRoad, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
A heuristic to find short roads near traffic signals
pub fn find_dog_legs(&mut self) -> Vec<OriginalRoad, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn find_dog_legs(&mut self) -> Vec<OriginalRoad, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
A heuristic to find short roads in places that would otherwise be a normal four-way intersection
|
|
---X~~X----
|
|
The ~~ is the short road we want to detect
impl StreetNetwork
impl StreetNetwork
pub fn merge_short_road(
&mut self,
short: OriginalRoad
) -> Result<(NodeID, NodeID, Vec<OriginalRoad, Global>, Vec<OriginalRoad, Global>), Error>
pub fn merge_short_road(
&mut self,
short: OriginalRoad
) -> Result<(NodeID, NodeID, Vec<OriginalRoad, Global>, Vec<OriginalRoad, Global>), Error>
Returns (the surviving intersection, the deleted intersection, deleted roads, new roads)
impl StreetNetwork
impl StreetNetwork
pub fn run_all_simplifications(
&mut self,
consolidate_all_intersections: bool,
remove_disconnected: bool,
timer: &mut Timer<'_>
)
pub fn run_all_simplifications(
&mut self,
consolidate_all_intersections: bool,
remove_disconnected: bool,
timer: &mut Timer<'_>
)
Run a sequence of transformations to the StreetNetwork before converting it to a full Map.
We don’t want to run these during the OSM->StreetNetwork import stage, because we want to use the map_editor tool to debug the StreetNetwork.
impl StreetNetwork
impl StreetNetwork
pub fn blank() -> StreetNetwork
pub fn roads_per_intersection(&self, i: NodeID) -> Vec<OriginalRoad, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn new_osm_node_id(&self, start: i64) -> NodeID
pub fn preview_intersection(
&self,
id: NodeID
) -> Result<(Polygon, Vec<Polygon, Global>, Vec<(String, Polygon), Global>), Error>
pub fn preview_intersection(
&self,
id: NodeID
) -> Result<(Polygon, Vec<Polygon, Global>, Vec<(String, Polygon), Global>), Error>
(Intersection polygon, polygons for roads, list of labeled polygons to debug)
pub fn trimmed_road_geometry(
&self,
road_id: OriginalRoad
) -> Result<PolyLine, Error>
pub fn trimmed_road_geometry(
&self,
road_id: OriginalRoad
) -> Result<PolyLine, Error>
Generate the trimmed PolyLine
for a single RawRoad by calculating both intersections
impl StreetNetwork
impl StreetNetwork
pub fn can_delete_intersection(&self, i: NodeID) -> bool
pub fn delete_intersection(&mut self, id: NodeID)
pub fn move_intersection(
&mut self,
id: NodeID,
point: Pt2D
) -> Option<Vec<OriginalRoad, Global>>
pub fn closest_intersection(&self, pt: Pt2D) -> NodeID
pub fn path_dist_to(&self, from: NodeID, to: NodeID) -> Option<Distance>
Trait Implementations
impl Debug for StreetNetwork
impl Debug for StreetNetwork
impl<'de> Deserialize<'de> for StreetNetwork
impl<'de> Deserialize<'de> for StreetNetwork
fn deserialize<__D>(
__deserializer: __D
) -> Result<StreetNetwork, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<StreetNetwork, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Serialize for StreetNetwork
impl Serialize for StreetNetwork
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
Auto Trait Implementations
impl RefUnwindSafe for StreetNetwork
impl Send for StreetNetwork
impl Sync for StreetNetwork
impl Unpin for StreetNetwork
impl UnwindSafe for StreetNetwork
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