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>, }
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: MapConfig
onstreet_parking: OnstreetParking
public_offstreet_parking: PublicOffstreetParking
private_offstreet_parking: PrivateOffstreetParking
include_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
pub async fn osm_to_raw(
&self,
name: MapName,
timer: &mut Timer<'_>,
config: &ImporterConfiguration
) -> RawMap
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
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
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
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
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
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
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self