Struct raw_map::RawMap [−][src]
pub struct RawMap {
pub name: MapName,
pub roads: BTreeMap<OriginalRoad, RawRoad>,
pub intersections: BTreeMap<NodeID, RawIntersection>,
pub buildings: BTreeMap<OsmID, RawBuilding>,
pub areas: Vec<RawArea>,
pub parking_lots: Vec<RawParkingLot>,
pub parking_aisles: Vec<(WayID, Vec<Pt2D>)>,
pub transit_routes: Vec<RawTransitRoute>,
pub transit_stops: BTreeMap<String, RawTransitStop>,
pub boundary_polygon: Polygon,
pub gps_bounds: GPSBounds,
pub config: MapConfig,
}
Fields
name: MapName
roads: BTreeMap<OriginalRoad, RawRoad>
intersections: BTreeMap<NodeID, RawIntersection>
buildings: BTreeMap<OsmID, RawBuilding>
areas: Vec<RawArea>
parking_lots: Vec<RawParkingLot>
parking_aisles: Vec<(WayID, Vec<Pt2D>)>
transit_routes: Vec<RawTransitRoute>
transit_stops: BTreeMap<String, RawTransitStop>
boundary_polygon: Polygon
gps_bounds: GPSBounds
config: MapConfig
Implementations
fn mark_short_roads(&mut self, list: Vec<OriginalRoad>) -> Vec<OriginalRoad>ⓘ
pub fn find_traffic_signal_clusters(&mut self) -> Vec<OriginalRoad>ⓘ
pub fn find_traffic_signal_clusters(&mut self) -> Vec<OriginalRoad>ⓘ
A heuristic to find short roads near traffic signals
pub fn find_dog_legs(&mut self) -> Vec<OriginalRoad>ⓘ
pub fn find_dog_legs(&mut self) -> Vec<OriginalRoad>ⓘ
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
pub fn merge_short_road(
&mut self,
short: OriginalRoad
) -> Result<(NodeID, NodeID, Vec<OriginalRoad>, Vec<OriginalRoad>)>
pub fn merge_short_road(
&mut self,
short: OriginalRoad
) -> Result<(NodeID, NodeID, Vec<OriginalRoad>, Vec<OriginalRoad>)>
Returns (the surviving intersection, the deleted intersection, deleted roads, new roads)
pub fn run_all_simplifications(
&mut self,
consolidate_all_intersections: bool,
timer: &mut Timer<'_>
)
pub fn run_all_simplifications(
&mut self,
consolidate_all_intersections: bool,
timer: &mut Timer<'_>
)
Run a sequence of transformations to the RawMap before converting it to a full Map.
We don’t want to run these during the OSM->RawMap import stage, because we want to use the map_editor tool to debug the RawMap.
pub fn roads_per_intersection(&self, i: NodeID) -> Vec<OriginalRoad>ⓘ
(Intersection polygon, polygons for roads, list of labeled polygons to debug)
Generate the trimmed PolyLine
for a single RawRoad by calculating both intersections
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