Struct importer::generic::GenericCityImporter[][src]

pub struct GenericCityImporter {
    pub osm_url: String,
    pub map_config: MapConfig,
    pub onstreet_parking: OnstreetParking,
    pub public_offstreet_parking: PublicOffstreetParking,
    pub private_offstreet_parking: PrivateOffstreetParking,
    pub include_railroads: bool,
    pub extra_buildings: Option<String>,
}

Importing a new city can be done just by filling out this config file and specifying some polygon boundaries. Most fields are directly from convert_osm::Options.

If any extra data is imported for a city (like collisions or population), then for now, don’t use this.

Fields

osm_url: String

The URL to a .osm or .osm.pbf file containing the entire city. http://download.geofabrik.de/ is recommended.

You can also put a path like input/us/seattle/osm/washington-latest.osm.pbf in here, and instead that file will be used. This is kind of a hack, because it’ll assume the cities are imported in the proper order, but it prevents having to download duplicate large files.

map_config: MapConfigonstreet_parking: OnstreetParkingpublic_offstreet_parking: PublicOffstreetParkingprivate_offstreet_parking: PrivateOffstreetParkinginclude_railroads: bool

OSM railway=rail will be included as light rail if so. Cosmetic only.

extra_buildings: Option<String>

If provided, read polygons from this GeoJSON file and add them to the RawMap as buildings.

Implementations

impl GenericCityImporter[src]

pub async fn osm_to_raw(
    &self,
    name: MapName,
    timer: &mut Timer<'_>,
    config: &ImporterConfiguration
) -> RawMap
[src]

Trait Implementations

impl<'de> Deserialize<'de> for GenericCityImporter[src]

impl Serialize for GenericCityImporter[src]

Auto Trait Implementations

impl RefUnwindSafe for GenericCityImporter

impl Send for GenericCityImporter

impl Sync for GenericCityImporter

impl Unpin for GenericCityImporter

impl UnwindSafe for GenericCityImporter

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,