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>,
    pub filter_crosswalks: bool,
}
Expand description

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.

filter_crosswalks: bool

Downgrade crosswalks not matching a highway=crossing OSM node into unmarked crossings.

Implementations

Trait Implementations

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

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

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

Performs the conversion.

Should always be Self

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.