Struct raw_map::RawMap

source ·
pub struct RawMap {
Show 14 fields pub name: MapName, pub streets: StreetNetwork, 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 census_zones: Vec<(Polygon, CensusZone)>, pub transit_stops: BTreeMap<String, RawTransitStop>, pub bus_routes_on_roads: MultiMap<WayID, String>, pub osm_tags: BTreeMap<WayID, Tags>, pub extra_road_data: BTreeMap<RoadID, ExtraRoadData>, pub elevation_per_intersection: BTreeMap<IntersectionID, Distance>, pub extra_pois: Vec<ExtraPOI>,
}

Fields§

§name: MapName§streets: StreetNetwork§buildings: BTreeMap<OsmID, RawBuilding>§areas: Vec<RawArea>§parking_lots: Vec<RawParkingLot>§parking_aisles: Vec<(WayID, Vec<Pt2D>)>§transit_routes: Vec<RawTransitRoute>§census_zones: Vec<(Polygon, CensusZone)>§transit_stops: BTreeMap<String, RawTransitStop>§bus_routes_on_roads: MultiMap<WayID, String>

Per road, what bus routes run along it?

This is scraped from OSM relations for every map, unlike the more detailed transit_routes above, which come from GTFS only for a few maps. This is used only to identify roads part of bus routes. It’s best-effort and not robust to edits or transformations.

§osm_tags: BTreeMap<WayID, Tags>§extra_road_data: BTreeMap<RoadID, ExtraRoadData>§elevation_per_intersection: BTreeMap<IntersectionID, Distance>§extra_pois: Vec<ExtraPOI>

Implementations§

source§

impl RawMap

source

pub fn blank(name: MapName) -> RawMap

source

pub fn save(&self)

source

pub fn get_city_name(&self) -> &CityName

source

pub fn road_to_osm_tags(&self, id: RoadID) -> Option<&Tags>

Trait Implementations§

source§

impl<'de> Deserialize<'de> for RawMap

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for RawMap

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

§

fn is_within(&self, b: &G2) -> bool

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,