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: Polygongps_bounds: GPSBoundsconfig: MapConfig

Implementations

Assumes run_all_simplifications has been called if desired

Assumes run_all_simplifications has been called if desired

A heuristic to find short roads near traffic signals

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

Returns (the surviving intersection, the deleted intersection, deleted roads, new roads)

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.

(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

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.