diff --git a/rustdoc/convert_osm/all.html b/rustdoc/convert_osm/all.html index 35bd82ba4f..4448a6f11a 100644 --- a/rustdoc/convert_osm/all.html +++ b/rustdoc/convert_osm/all.html @@ -1,3 +1,3 @@ List of all items in this crate

[] - List of all items

Structs

Enums

Functions

Constants

\ No newline at end of file + List of all items

Structs

Enums

Functions

Constants

\ No newline at end of file diff --git a/rustdoc/convert_osm/enum.OnstreetParking.html b/rustdoc/convert_osm/enum.OnstreetParking.html index 8448492f21..5cc2cd2ee4 100644 --- a/rustdoc/convert_osm/enum.OnstreetParking.html +++ b/rustdoc/convert_osm/enum.OnstreetParking.html @@ -1,4 +1,4 @@ -convert_osm::OnstreetParking - Rust

[][src]Enum convert_osm::OnstreetParking

pub enum OnstreetParking {
+convert_osm::OnstreetParking - Rust

[][src]Enum convert_osm::OnstreetParking

pub enum OnstreetParking {
     JustOSM,
     Blockface(String),
     SomeAdditionalWhereNoData {
diff --git a/rustdoc/convert_osm/enum.PrivateOffstreetParking.html b/rustdoc/convert_osm/enum.PrivateOffstreetParking.html
index f54eeb2056..d7279df1b0 100644
--- a/rustdoc/convert_osm/enum.PrivateOffstreetParking.html
+++ b/rustdoc/convert_osm/enum.PrivateOffstreetParking.html
@@ -1,4 +1,4 @@
-convert_osm::PrivateOffstreetParking - Rust

[][src]Enum convert_osm::PrivateOffstreetParking

pub enum PrivateOffstreetParking {
+convert_osm::PrivateOffstreetParking - Rust

[][src]Enum convert_osm::PrivateOffstreetParking

pub enum PrivateOffstreetParking {
     FixedPerBldg(usize),
 }

Variants

diff --git a/rustdoc/convert_osm/enum.PublicOffstreetParking.html b/rustdoc/convert_osm/enum.PublicOffstreetParking.html index e57c22742e..e6bae61a4b 100644 --- a/rustdoc/convert_osm/enum.PublicOffstreetParking.html +++ b/rustdoc/convert_osm/enum.PublicOffstreetParking.html @@ -1,4 +1,4 @@ -convert_osm::PublicOffstreetParking - Rust

[][src]Enum convert_osm::PublicOffstreetParking

pub enum PublicOffstreetParking {
+convert_osm::PublicOffstreetParking - Rust

[][src]Enum convert_osm::PublicOffstreetParking

pub enum PublicOffstreetParking {
     None,
     GIS(String),
 }

diff --git a/rustdoc/convert_osm/fn.convert.html b/rustdoc/convert_osm/fn.convert.html index fa6b088a68..063334b2c2 100644 --- a/rustdoc/convert_osm/fn.convert.html +++ b/rustdoc/convert_osm/fn.convert.html @@ -1 +1 @@ -convert_osm::convert - Rust

[][src]Function convert_osm::convert

pub fn convert(opts: Options, timer: &mut Timer) -> RawMap
\ No newline at end of file +convert_osm::convert - Rust

[][src]Function convert_osm::convert

pub fn convert(opts: Options, timer: &mut Timer) -> RawMap
\ No newline at end of file diff --git a/rustdoc/convert_osm/fn.use_amenities.html b/rustdoc/convert_osm/fn.use_amenities.html index b24fb2c94f..678cc78be1 100644 --- a/rustdoc/convert_osm/fn.use_amenities.html +++ b/rustdoc/convert_osm/fn.use_amenities.html @@ -1 +1 @@ -convert_osm::use_amenities - Rust

[][src]Function convert_osm::use_amenities

fn use_amenities(
    map: &mut RawMap,
    amenities: Vec<(Pt2D, NamePerLanguage, String)>,
    timer: &mut Timer
)
\ No newline at end of file +convert_osm::use_amenities - Rust

[][src]Function convert_osm::use_amenities

fn use_amenities(
    map: &mut RawMap,
    amenities: Vec<(Pt2D, NamePerLanguage, String)>,
    timer: &mut Timer
)
\ No newline at end of file diff --git a/rustdoc/convert_osm/fn.use_elevation.html b/rustdoc/convert_osm/fn.use_elevation.html index 5fb179720f..2f21b87644 100644 --- a/rustdoc/convert_osm/fn.use_elevation.html +++ b/rustdoc/convert_osm/fn.use_elevation.html @@ -1 +1 @@ -convert_osm::use_elevation - Rust

[][src]Function convert_osm::use_elevation

fn use_elevation(map: &mut RawMap, path: &str, timer: &mut Timer)
\ No newline at end of file +convert_osm::use_elevation - Rust

[][src]Function convert_osm::use_elevation

fn use_elevation(map: &mut RawMap, path: &str, timer: &mut Timer)
\ No newline at end of file diff --git a/rustdoc/convert_osm/index.html b/rustdoc/convert_osm/index.html index 95fd9290e8..bf169c1ad2 100644 --- a/rustdoc/convert_osm/index.html +++ b/rustdoc/convert_osm/index.html @@ -1,5 +1,5 @@ -convert_osm - Rust

[][src]Crate convert_osm

Modules

-
clip
extract
parking
reader
split_ways
srtm
transit

Structs

+convert_osm - Rust

[][src]Crate convert_osm

Modules

+
clip
extract
parking
reader
snappy
split_ways
srtm
transit

Structs

Options

Enums

OnstreetParking
PrivateOffstreetParking
PublicOffstreetParking

Functions

convert
use_amenities
use_elevation
\ No newline at end of file diff --git a/rustdoc/convert_osm/sidebar-items.js b/rustdoc/convert_osm/sidebar-items.js index 7830325dd4..62d6ab444f 100644 --- a/rustdoc/convert_osm/sidebar-items.js +++ b/rustdoc/convert_osm/sidebar-items.js @@ -1 +1 @@ -initSidebarItems({"enum":[["OnstreetParking",""],["PrivateOffstreetParking",""],["PublicOffstreetParking",""]],"fn":[["convert",""],["use_amenities",""],["use_elevation",""]],"mod":[["clip",""],["extract",""],["parking",""],["reader",""],["split_ways",""],["srtm",""],["transit",""]],"struct":[["Options",""]]}); \ No newline at end of file +initSidebarItems({"enum":[["OnstreetParking",""],["PrivateOffstreetParking",""],["PublicOffstreetParking",""]],"fn":[["convert",""],["use_amenities",""],["use_elevation",""]],"mod":[["clip",""],["extract",""],["parking",""],["reader",""],["snappy",""],["split_ways",""],["srtm",""],["transit",""]],"struct":[["Options",""]]}); \ No newline at end of file diff --git a/rustdoc/convert_osm/snappy/fn.dump_output.html b/rustdoc/convert_osm/snappy/fn.dump_output.html new file mode 100644 index 0000000000..a73a927d41 --- /dev/null +++ b/rustdoc/convert_osm/snappy/fn.dump_output.html @@ -0,0 +1 @@ +convert_osm::snappy::dump_output - Rust

[][src]Function convert_osm::snappy::dump_output

fn dump_output(
    map: &RawMap,
    cycleways: &HashMap<WayID, ExtraShape>,
    road_edges: &HashMap<(OriginalRoad, Direction), PolyLine>,
    matches: MultiMap<(OriginalRoad, Direction), WayID>
)
\ No newline at end of file diff --git a/rustdoc/convert_osm/snappy/fn.snap_cycleways.html b/rustdoc/convert_osm/snappy/fn.snap_cycleways.html new file mode 100644 index 0000000000..82cdec66a9 --- /dev/null +++ b/rustdoc/convert_osm/snappy/fn.snap_cycleways.html @@ -0,0 +1 @@ +convert_osm::snappy::snap_cycleways - Rust

[][src]Function convert_osm::snappy::snap_cycleways

pub fn snap_cycleways(map: &RawMap, timer: &mut Timer)
\ No newline at end of file diff --git a/rustdoc/convert_osm/snappy/fn.v1.html b/rustdoc/convert_osm/snappy/fn.v1.html new file mode 100644 index 0000000000..bd2e01ff47 --- /dev/null +++ b/rustdoc/convert_osm/snappy/fn.v1.html @@ -0,0 +1 @@ +convert_osm::snappy::v1 - Rust

[][src]Function convert_osm::snappy::v1

fn v1(
    map: &RawMap,
    cycleways: &HashMap<WayID, ExtraShape>,
    road_edges: &HashMap<(OriginalRoad, Direction), PolyLine>
) -> MultiMap<(OriginalRoad, Direction), WayID>
\ No newline at end of file diff --git a/rustdoc/convert_osm/snappy/index.html b/rustdoc/convert_osm/snappy/index.html new file mode 100644 index 0000000000..1feb517903 --- /dev/null +++ b/rustdoc/convert_osm/snappy/index.html @@ -0,0 +1,2 @@ +convert_osm::snappy - Rust

[][src]Module convert_osm::snappy

Functions

+
dump_output
snap_cycleways
v1
\ No newline at end of file diff --git a/rustdoc/convert_osm/snappy/sidebar-items.js b/rustdoc/convert_osm/snappy/sidebar-items.js new file mode 100644 index 0000000000..fb4849fec9 --- /dev/null +++ b/rustdoc/convert_osm/snappy/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["dump_output",""],["snap_cycleways",""],["v1",""]]}); \ No newline at end of file diff --git a/rustdoc/convert_osm/struct.Options.html b/rustdoc/convert_osm/struct.Options.html index d29b2ee3bd..c0207d83f1 100644 --- a/rustdoc/convert_osm/struct.Options.html +++ b/rustdoc/convert_osm/struct.Options.html @@ -1,4 +1,4 @@ -convert_osm::Options - Rust

[][src]Struct convert_osm::Options

pub struct Options {
+convert_osm::Options - Rust

[][src]Struct convert_osm::Options

pub struct Options {
     pub osm_input: String,
     pub city_name: String,
     pub name: String,
diff --git a/rustdoc/game/devtools/kml/fn.make_object.html b/rustdoc/game/devtools/kml/fn.make_object.html
index c2dcee8a44..40d8580947 100644
--- a/rustdoc/game/devtools/kml/fn.make_object.html
+++ b/rustdoc/game/devtools/kml/fn.make_object.html
@@ -1 +1 @@
-game::devtools::kml::make_object - Rust

[][src]Function game::devtools::kml::make_object

fn make_object(
    cs: &ColorScheme,
    bldg_lookup: &HashMap<String, BuildingID>,
    attribs: BTreeMap<String, String>,
    pts: Vec<Pt2D>,
    dataset_name: &str,
    obj_idx: usize
) -> Object
\ No newline at end of file +game::devtools::kml::make_object - Rust

[][src]Function game::devtools::kml::make_object

fn make_object(
    cs: &ColorScheme,
    bldg_lookup: &HashMap<String, BuildingID>,
    attribs: BTreeMap<String, String>,
    pts: Vec<Pt2D>,
    dataset_name: &str,
    obj_idx: usize
) -> Object
\ No newline at end of file diff --git a/rustdoc/game/devtools/kml/fn.make_query.html b/rustdoc/game/devtools/kml/fn.make_query.html index fedce2baf7..f76b640a38 100644 --- a/rustdoc/game/devtools/kml/fn.make_query.html +++ b/rustdoc/game/devtools/kml/fn.make_query.html @@ -1 +1 @@ -game::devtools::kml::make_query - Rust

[][src]Function game::devtools::kml::make_query

fn make_query(
    app: &App,
    objects: &Vec<Object>,
    query: &str
) -> (GeomBatch, usize)
\ No newline at end of file +game::devtools::kml::make_query - Rust

[][src]Function game::devtools::kml::make_query

fn make_query(
    app: &App,
    objects: &Vec<Object>,
    query: &str
) -> (GeomBatch, usize)
\ No newline at end of file diff --git a/rustdoc/game/devtools/kml/index.html b/rustdoc/game/devtools/kml/index.html index db076f4013..7409239a1a 100644 --- a/rustdoc/game/devtools/kml/index.html +++ b/rustdoc/game/devtools/kml/index.html @@ -1,4 +1,4 @@ -game::devtools::kml - Rust

[][src]Module game::devtools::kml

Structs

+game::devtools::kml - Rust

[][src]Module game::devtools::kml

Structs

Object
ViewKML

Constants

RADIUS
THICKNESS

Functions

make_object
make_query
\ No newline at end of file diff --git a/rustdoc/game/devtools/kml/struct.ViewKML.html b/rustdoc/game/devtools/kml/struct.ViewKML.html index d063fd633e..fd164ee221 100644 --- a/rustdoc/game/devtools/kml/struct.ViewKML.html +++ b/rustdoc/game/devtools/kml/struct.ViewKML.html @@ -6,7 +6,7 @@ quadtree: QuadTree<usize>, draw_query: Drawable, }

- Fields

panel: Panelobjects: Vec<Object>draw: Drawableselected: Option<usize>quadtree: QuadTree<usize>draw_query: Drawable

Implementations

impl ViewKML[src]

pub fn new(
    ctx: &mut EventCtx,
    app: &App,
    path: Option<String>
) -> Box<dyn State>
[src]

Trait Implementations

impl State for ViewKML[src]

Auto Trait Implementations

impl !RefUnwindSafe for ViewKML

impl !Send for ViewKML

impl !Sync for ViewKML

impl Unpin for ViewKML

impl !UnwindSafe for ViewKML

Blanket Implementations

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

panel: Panelobjects: Vec<Object>draw: Drawableselected: Option<usize>quadtree: QuadTree<usize>draw_query: Drawable

Implementations

impl ViewKML[src]

pub fn new(
    ctx: &mut EventCtx,
    app: &App,
    path: Option<String>
) -> Box<dyn State>
[src]

Trait Implementations

impl State for ViewKML[src]

Auto Trait Implementations

impl !RefUnwindSafe for ViewKML

impl !Send for ViewKML

impl !Sync for ViewKML

impl Unpin for ViewKML

impl !UnwindSafe for ViewKML

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> Downcast for T where
    T: Any

pub fn downcast_mut<__T: State>(&mut self) -> Option<&mut __T>

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn't.

-

Implementors

impl State for ChallengesPicker[src]

impl State for CityPicker[src]

impl State for IsochroneViewer[src]

impl State for CrossStreet[src]

impl State for Navigator[src]

impl State for SearchBuildings[src]

impl State for DebugWarp[src]

impl State for Warping[src]

impl State for CutscenePlayer[src]

impl State for FYI[src]

impl State for Floodfiller[src]

impl State for PolygonDebugger[src]

impl State for DebugMode[src]

impl State for ScreenshotTest[src]

impl State for PopularDestinations[src]

impl State for ViewKML[src]

impl State for ChangeWay[src]

impl State for ParkingMapper[src]

impl State for PolygonEditor[src]

impl State for ScenarioManager[src]

impl State for StoryMapEditor[src]

impl State for DevToolsMode[src]

impl State for BulkEdit[src]

impl State for BulkSelect[src]

impl State for ClusterTrafficSignalEditor[src]

impl State for LaneEditor[src]

impl State for RouteEditor[src]

impl State for StopSignEditor[src]

impl State for ConfirmDiscard[src]

impl State for EditMode[src]

impl State for LoadEdits[src]

impl State for SaveEdits[src]

impl State for ChangeDuration[src]

impl State for ShowAbsolute[src]

impl State for ShowRelative[src]

impl State for TuneRelative[src]

impl State for SignalPicker[src]

impl State for PreviewTrafficSignal[src]

impl State for TrafficSignalEditor[src]

impl State for ZoneEditor[src]

impl State for PopupMsg[src]

impl State for PromptInput[src]

impl State for PickLayer[src]

impl State for OptionsPanel[src]

impl State for About[src]

impl State for MainMenu[src]

impl State for Proposals[src]

impl State for TitleScreen[src]

impl State for CommuterPatterns[src]

impl State for ActiveTraffic[src]

impl State for TransitRoutes[src]

impl State for TripSummaries[src]

impl State for TrafficSignalDemand[src]

impl State for AgentSpawner[src]

impl State for ChangeMode[src]

impl State for EditScenarioModifiers[src]

impl State for FinalScore[src]

impl State for TurnExplorer[src]

impl State for BackToMainMenu[src]

impl State for SandboxMode[src]

impl State for JumpToDelay[src]

impl State for JumpToTime[src]

impl State for TimeWarpScreen[src]

impl State for UberTurnPicker[src]

impl State for UberTurnViewer[src]

impl<T: 'static> State for ChooseSomething<T>[src]

impl<T: 'static, F: 'static, P: 'static + Fn(&mut EventCtx, &App, &Table<T, F>) -> Panel> State for GenericTripTable<T, F, P>[src]

Loading content...
\ No newline at end of file +

Implementors

impl State for ChallengesPicker[src]

impl State for CityPicker[src]

impl State for IsochroneViewer[src]

impl State for CrossStreet[src]

impl State for Navigator[src]

impl State for SearchBuildings[src]

impl State for DebugWarp[src]

impl State for Warping[src]

impl State for CutscenePlayer[src]

impl State for FYI[src]

impl State for Floodfiller[src]

impl State for PolygonDebugger[src]

impl State for DebugMode[src]

impl State for ScreenshotTest[src]

impl State for PopularDestinations[src]

impl State for ViewKML[src]

impl State for ChangeWay[src]

impl State for ParkingMapper[src]

impl State for PolygonEditor[src]

impl State for ScenarioManager[src]

impl State for StoryMapEditor[src]

impl State for DevToolsMode[src]

impl State for BulkEdit[src]

impl State for BulkSelect[src]

impl State for ClusterTrafficSignalEditor[src]

impl State for LaneEditor[src]

impl State for RouteEditor[src]

impl State for StopSignEditor[src]

impl State for ConfirmDiscard[src]

impl State for EditMode[src]

impl State for LoadEdits[src]

impl State for SaveEdits[src]

impl State for ChangeDuration[src]

impl State for ShowAbsolute[src]

impl State for ShowRelative[src]

impl State for TuneRelative[src]

impl State for SignalPicker[src]

impl State for PreviewTrafficSignal[src]

impl State for TrafficSignalEditor[src]

impl State for ZoneEditor[src]

impl State for PopupMsg[src]

impl State for PromptInput[src]

impl State for PickLayer[src]

impl State for OptionsPanel[src]

impl State for About[src]

impl State for MainMenu[src]

impl State for Proposals[src]

impl State for TitleScreen[src]

impl State for CommuterPatterns[src]

impl State for ActiveTraffic[src]

impl State for TransitRoutes[src]

impl State for TripSummaries[src]

impl State for TrafficSignalDemand[src]

impl State for AgentSpawner[src]

impl State for ChangeMode[src]

impl State for EditScenarioModifiers[src]

impl State for FinalScore[src]

impl State for TurnExplorer[src]

impl State for BackToMainMenu[src]

impl State for SandboxMode[src]

impl State for JumpToDelay[src]

impl State for JumpToTime[src]

impl State for TimeWarpScreen[src]

impl State for UberTurnPicker[src]

impl State for UberTurnViewer[src]

impl<T: 'static> State for ChooseSomething<T>[src]

impl<T: 'static, F: 'static, P: 'static + Fn(&mut EventCtx, &App, &Table<T, F>) -> Panel> State for GenericTripTable<T, F, P>[src]

Loading content...
\ No newline at end of file diff --git a/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html b/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html index 8f66052872..3914d6a466 100644 --- a/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html +++ b/rustdoc/game/pregame/built_info/constant.BUILT_TIME_UTC.html @@ -1,2 +1,2 @@ -game::pregame::built_info::BUILT_TIME_UTC - Rust

[][src]Constant game::pregame::built_info::BUILT_TIME_UTC

pub const BUILT_TIME_UTC: &str = "Fri, 25 Sep 2020 22:26:13 +0000";

The built-time in RFC2822, UTC

+game::pregame::built_info::BUILT_TIME_UTC - Rust

[][src]Constant game::pregame::built_info::BUILT_TIME_UTC

pub const BUILT_TIME_UTC: &str = "Fri, 25 Sep 2020 22:39:00 +0000";

The built-time in RFC2822, UTC

\ No newline at end of file diff --git a/rustdoc/implementors/core/clone/trait.Clone.js b/rustdoc/implementors/core/clone/trait.Clone.js index db16721d53..764105ad81 100644 --- a/rustdoc/implementors/core/clone/trait.Clone.js +++ b/rustdoc/implementors/core/clone/trait.Clone.js @@ -2,6 +2,7 @@ implementors["abstutil"] = [{"text":"impl<K: Clone, V: Clone> Clone for MultiMap<K, V> where
    K: Ord + PartialEq + Clone,
    V: Ord + PartialEq + Clone
","synthetic":false,"types":["abstutil::collections::MultiMap"]},{"text":"impl<T: Clone + Ord + PartialEq> Clone for Counter<T>","synthetic":false,"types":["abstutil::collections::Counter"]},{"text":"impl Clone for Tags","synthetic":false,"types":["abstutil::collections::Tags"]},{"text":"impl Clone for WeightedUsizeChoice","synthetic":false,"types":["abstutil::random::WeightedUsizeChoice"]}]; implementors["game"] = [{"text":"impl Clone for Flags","synthetic":false,"types":["game::app::Flags"]},{"text":"impl Clone for ColorSchemeChoice","synthetic":false,"types":["game::colors::ColorSchemeChoice"]},{"text":"impl Clone for HeatmapOptions","synthetic":false,"types":["game::common::heatmap::HeatmapOptions"]},{"text":"impl Clone for Source","synthetic":false,"types":["game::debug::floodfill::Source"]},{"text":"impl Clone for Show","synthetic":false,"types":["game::devtools::mapping::Show"]},{"text":"impl Clone for Value","synthetic":false,"types":["game::devtools::mapping::Value"]},{"text":"impl Clone for RecordedStoryMap","synthetic":false,"types":["game::devtools::story::RecordedStoryMap"]},{"text":"impl Clone for BundleEdits","synthetic":false,"types":["game::edit::traffic_signals::BundleEdits"]},{"text":"impl Clone for ID","synthetic":false,"types":["game::helpers::ID"]},{"text":"impl Clone for OpenTrip","synthetic":false,"types":["game::info::trip::OpenTrip"]},{"text":"impl Clone for Tab","synthetic":false,"types":["game::info::Tab"]},{"text":"impl Clone for DataOptions","synthetic":false,"types":["game::info::DataOptions"]},{"text":"impl Clone for SEIR","synthetic":false,"types":["game::layer::pandemic::SEIR"]},{"text":"impl Clone for Options","synthetic":false,"types":["game::layer::pandemic::Options"]},{"text":"impl Clone for Loc","synthetic":false,"types":["game::layer::parking::Loc"]},{"text":"impl Clone for Options","synthetic":false,"types":["game::layer::population::Options"]},{"text":"impl Clone for Options","synthetic":false,"types":["game::options::Options"]},{"text":"impl Clone for TrafficSignalStyle","synthetic":false,"types":["game::options::TrafficSignalStyle"]},{"text":"impl Clone for CameraAngle","synthetic":false,"types":["game::options::CameraAngle"]},{"text":"impl Clone for UnzoomedAgents","synthetic":false,"types":["game::render::map::UnzoomedAgents"]},{"text":"impl Clone for DrawOptions","synthetic":false,"types":["game::render::DrawOptions"]},{"text":"impl Clone for BlockSelection","synthetic":false,"types":["game::sandbox::dashboards::commuter::BlockSelection"]},{"text":"impl Clone for DashTab","synthetic":false,"types":["game::sandbox::dashboards::DashTab"]},{"text":"impl Clone for TutorialPointer","synthetic":false,"types":["game::sandbox::gameplay::tutorial::TutorialPointer"]},{"text":"impl Clone for Task","synthetic":false,"types":["game::sandbox::gameplay::tutorial::Task"]},{"text":"impl Clone for GameplayMode","synthetic":false,"types":["game::sandbox::gameplay::GameplayMode"]},{"text":"impl Clone for SpeedSetting","synthetic":false,"types":["game::sandbox::speed::SpeedSetting"]}]; implementors["geom"] = [{"text":"impl Clone for Angle","synthetic":false,"types":["geom::angle::Angle"]},{"text":"impl Clone for Bounds","synthetic":false,"types":["geom::bounds::Bounds"]},{"text":"impl Clone for GPSBounds","synthetic":false,"types":["geom::bounds::GPSBounds"]},{"text":"impl Clone for Circle","synthetic":false,"types":["geom::circle::Circle"]},{"text":"impl Clone for Distance","synthetic":false,"types":["geom::distance::Distance"]},{"text":"impl Clone for Duration","synthetic":false,"types":["geom::duration::Duration"]},{"text":"impl Clone for LonLat","synthetic":false,"types":["geom::gps::LonLat"]},{"text":"impl Clone for Line","synthetic":false,"types":["geom::line::Line"]},{"text":"impl Clone for InfiniteLine","synthetic":false,"types":["geom::line::InfiniteLine"]},{"text":"impl Clone for Percent","synthetic":false,"types":["geom::percent::Percent"]},{"text":"impl Clone for Polygon","synthetic":false,"types":["geom::polygon::Polygon"]},{"text":"impl Clone for Triangle","synthetic":false,"types":["geom::polygon::Triangle"]},{"text":"impl Clone for PolyLine","synthetic":false,"types":["geom::polyline::PolyLine"]},{"text":"impl Clone for Pt2D","synthetic":false,"types":["geom::pt::Pt2D"]},{"text":"impl Clone for HashablePt2D","synthetic":false,"types":["geom::pt::HashablePt2D"]},{"text":"impl Clone for Ring","synthetic":false,"types":["geom::ring::Ring"]},{"text":"impl Clone for Speed","synthetic":false,"types":["geom::speed::Speed"]},{"text":"impl Clone for Statistic","synthetic":false,"types":["geom::stats::Statistic"]},{"text":"impl<T: Clone + HgramValue<T>> Clone for Histogram<T>","synthetic":false,"types":["geom::stats::Histogram"]},{"text":"impl Clone for Time","synthetic":false,"types":["geom::time::Time"]}]; +implementors["kml"] = [{"text":"impl Clone for ExtraShape","synthetic":false,"types":["kml::ExtraShape"]}]; implementors["map_editor"] = [{"text":"impl Clone for ID","synthetic":false,"types":["map_editor::model::ID"]}]; implementors["map_model"] = [{"text":"impl Clone for PermanentMapEdits","synthetic":false,"types":["map_model::edits::perma::PermanentMapEdits"]},{"text":"impl Clone for PermanentEditIntersection","synthetic":false,"types":["map_model::edits::perma::PermanentEditIntersection"]},{"text":"impl Clone for PermanentEditCmd","synthetic":false,"types":["map_model::edits::perma::PermanentEditCmd"]},{"text":"impl Clone for MapEdits","synthetic":false,"types":["map_model::edits::MapEdits"]},{"text":"impl Clone for EditIntersection","synthetic":false,"types":["map_model::edits::EditIntersection"]},{"text":"impl Clone for EditRoad","synthetic":false,"types":["map_model::edits::EditRoad"]},{"text":"impl Clone for EditCmd","synthetic":false,"types":["map_model::edits::EditCmd"]},{"text":"impl Clone for Partition","synthetic":false,"types":["map_model::make::traffic_signals::Partition"]},{"text":"impl Clone for MapConfig","synthetic":false,"types":["map_model::map::MapConfig"]},{"text":"impl Clone for DrivingSide","synthetic":false,"types":["map_model::map::DrivingSide"]},{"text":"impl Clone for AreaID","synthetic":false,"types":["map_model::objects::area::AreaID"]},{"text":"impl Clone for AreaType","synthetic":false,"types":["map_model::objects::area::AreaType"]},{"text":"impl Clone for BuildingID","synthetic":false,"types":["map_model::objects::building::BuildingID"]},{"text":"impl Clone for OffstreetParking","synthetic":false,"types":["map_model::objects::building::OffstreetParking"]},{"text":"impl Clone for NamePerLanguage","synthetic":false,"types":["map_model::objects::building::NamePerLanguage"]},{"text":"impl Clone for BusStopID","synthetic":false,"types":["map_model::objects::bus_stop::BusStopID"]},{"text":"impl Clone for BusRouteID","synthetic":false,"types":["map_model::objects::bus_stop::BusRouteID"]},{"text":"impl Clone for BusStop","synthetic":false,"types":["map_model::objects::bus_stop::BusStop"]},{"text":"impl Clone for IntersectionID","synthetic":false,"types":["map_model::objects::intersection::IntersectionID"]},{"text":"impl Clone for IntersectionType","synthetic":false,"types":["map_model::objects::intersection::IntersectionType"]},{"text":"impl Clone for LaneID","synthetic":false,"types":["map_model::objects::lane::LaneID"]},{"text":"impl Clone for LaneType","synthetic":false,"types":["map_model::objects::lane::LaneType"]},{"text":"impl Clone for ParkingLotID","synthetic":false,"types":["map_model::objects::parking_lot::ParkingLotID"]},{"text":"impl Clone for RoadID","synthetic":false,"types":["map_model::objects::road::RoadID"]},{"text":"impl Clone for Direction","synthetic":false,"types":["map_model::objects::road::Direction"]},{"text":"impl Clone for DirectedRoadID","synthetic":false,"types":["map_model::objects::road::DirectedRoadID"]},{"text":"impl Clone for ControlStopSign","synthetic":false,"types":["map_model::objects::stop_signs::ControlStopSign"]},{"text":"impl Clone for RoadWithStopSign","synthetic":false,"types":["map_model::objects::stop_signs::RoadWithStopSign"]},{"text":"impl Clone for ControlTrafficSignal","synthetic":false,"types":["map_model::objects::traffic_signals::ControlTrafficSignal"]},{"text":"impl Clone for Stage","synthetic":false,"types":["map_model::objects::traffic_signals::Stage"]},{"text":"impl Clone for PhaseType","synthetic":false,"types":["map_model::objects::traffic_signals::PhaseType"]},{"text":"impl Clone for TurnID","synthetic":false,"types":["map_model::objects::turn::TurnID"]},{"text":"impl Clone for TurnType","synthetic":false,"types":["map_model::objects::turn::TurnType"]},{"text":"impl Clone for TurnPriority","synthetic":false,"types":["map_model::objects::turn::TurnPriority"]},{"text":"impl Clone for Turn","synthetic":false,"types":["map_model::objects::turn::Turn"]},{"text":"impl Clone for MovementID","synthetic":false,"types":["map_model::objects::turn::MovementID"]},{"text":"impl Clone for CompressedMovementID","synthetic":false,"types":["map_model::objects::turn::CompressedMovementID"]},{"text":"impl Clone for Movement","synthetic":false,"types":["map_model::objects::turn::Movement"]},{"text":"impl Clone for AccessRestrictions","synthetic":false,"types":["map_model::objects::zone::AccessRestrictions"]},{"text":"impl Clone for RoadRank","synthetic":false,"types":["map_model::osm::RoadRank"]},{"text":"impl Clone for NodeID","synthetic":false,"types":["map_model::osm::NodeID"]},{"text":"impl Clone for WayID","synthetic":false,"types":["map_model::osm::WayID"]},{"text":"impl Clone for RelationID","synthetic":false,"types":["map_model::osm::RelationID"]},{"text":"impl Clone for OsmID","synthetic":false,"types":["map_model::osm::OsmID"]},{"text":"impl Clone for Node","synthetic":false,"types":["map_model::pathfind::driving::Node"]},{"text":"impl Clone for IntersectionCluster","synthetic":false,"types":["map_model::pathfind::uber_turns::IntersectionCluster"]},{"text":"impl Clone for UberTurn","synthetic":false,"types":["map_model::pathfind::uber_turns::UberTurn"]},{"text":"impl Clone for WalkingNode","synthetic":false,"types":["map_model::pathfind::walking::WalkingNode"]},{"text":"impl Clone for PathStep","synthetic":false,"types":["map_model::pathfind::PathStep"]},{"text":"impl Clone for Path","synthetic":false,"types":["map_model::pathfind::Path"]},{"text":"impl Clone for PathConstraints","synthetic":false,"types":["map_model::pathfind::PathConstraints"]},{"text":"impl Clone for PathRequest","synthetic":false,"types":["map_model::pathfind::PathRequest"]},{"text":"impl Clone for OriginalRoad","synthetic":false,"types":["map_model::raw::OriginalRoad"]},{"text":"impl Clone for RawRoad","synthetic":false,"types":["map_model::raw::RawRoad"]},{"text":"impl Clone for RawIntersection","synthetic":false,"types":["map_model::raw::RawIntersection"]},{"text":"impl Clone for RawBuilding","synthetic":false,"types":["map_model::raw::RawBuilding"]},{"text":"impl Clone for RawArea","synthetic":false,"types":["map_model::raw::RawArea"]},{"text":"impl Clone for RawParkingLot","synthetic":false,"types":["map_model::raw::RawParkingLot"]},{"text":"impl Clone for RestrictionType","synthetic":false,"types":["map_model::raw::RestrictionType"]},{"text":"impl Clone for TurnRestriction","synthetic":false,"types":["map_model::raw::TurnRestriction"]},{"text":"impl Clone for Position","synthetic":false,"types":["map_model::traversable::Position"]},{"text":"impl Clone for Traversable","synthetic":false,"types":["map_model::traversable::Traversable"]}]; implementors["sim"] = [{"text":"impl Clone for Analytics","synthetic":false,"types":["sim::analytics::Analytics"]},{"text":"impl<X: Clone + Ord> Clone for TimeSeriesCount<X>","synthetic":false,"types":["sim::analytics::TimeSeriesCount"]},{"text":"impl Clone for CapSimState","synthetic":false,"types":["sim::cap::CapSimState"]},{"text":"impl Clone for Zone","synthetic":false,"types":["sim::cap::Zone"]},{"text":"impl Clone for Event","synthetic":false,"types":["sim::events::Event"]},{"text":"impl Clone for AlertLocation","synthetic":false,"types":["sim::events::AlertLocation"]},{"text":"impl Clone for TripPhaseType","synthetic":false,"types":["sim::events::TripPhaseType"]},{"text":"impl Clone for ScenarioGenerator","synthetic":false,"types":["sim::make::generator::ScenarioGenerator"]},{"text":"impl Clone for SpawnOverTime","synthetic":false,"types":["sim::make::generator::SpawnOverTime"]},{"text":"impl Clone for BorderSpawnOverTime","synthetic":false,"types":["sim::make::generator::BorderSpawnOverTime"]},{"text":"impl Clone for OriginDestination","synthetic":false,"types":["sim::make::generator::OriginDestination"]},{"text":"impl Clone for SimFlags","synthetic":false,"types":["sim::make::load::SimFlags"]},{"text":"impl Clone for ScenarioModifier","synthetic":false,"types":["sim::make::modifier::ScenarioModifier"]},{"text":"impl Clone for Scenario","synthetic":false,"types":["sim::make::scenario::Scenario"]},{"text":"impl Clone for PersonSpec","synthetic":false,"types":["sim::make::scenario::PersonSpec"]},{"text":"impl Clone for IndividTrip","synthetic":false,"types":["sim::make::scenario::IndividTrip"]},{"text":"impl Clone for SpawnTrip","synthetic":false,"types":["sim::make::scenario::SpawnTrip"]},{"text":"impl Clone for OffMapLocation","synthetic":false,"types":["sim::make::scenario::OffMapLocation"]},{"text":"impl Clone for TripPurpose","synthetic":false,"types":["sim::make::scenario::TripPurpose"]},{"text":"impl Clone for TripSpec","synthetic":false,"types":["sim::make::spawner::TripSpec"]},{"text":"impl Clone for Car","synthetic":false,"types":["sim::mechanics::car::Car"]},{"text":"impl Clone for CarState","synthetic":false,"types":["sim::mechanics::car::CarState"]},{"text":"impl Clone for DrivingSimState","synthetic":false,"types":["sim::mechanics::driving::DrivingSimState"]},{"text":"impl Clone for IntersectionSimState","synthetic":false,"types":["sim::mechanics::intersection::IntersectionSimState"]},{"text":"impl Clone for State","synthetic":false,"types":["sim::mechanics::intersection::State"]},{"text":"impl Clone for SignalState","synthetic":false,"types":["sim::mechanics::intersection::SignalState"]},{"text":"impl Clone for Request","synthetic":false,"types":["sim::mechanics::intersection::Request"]},{"text":"impl Clone for ParkingSimState","synthetic":false,"types":["sim::mechanics::parking::ParkingSimState"]},{"text":"impl Clone for NormalParkingSimState","synthetic":false,"types":["sim::mechanics::parking::NormalParkingSimState"]},{"text":"impl Clone for ParkingLane","synthetic":false,"types":["sim::mechanics::parking::ParkingLane"]},{"text":"impl Clone for InfiniteParkingSimState","synthetic":false,"types":["sim::mechanics::parking::InfiniteParkingSimState"]},{"text":"impl Clone for Queue","synthetic":false,"types":["sim::mechanics::queue::Queue"]},{"text":"impl Clone for WalkingSimState","synthetic":false,"types":["sim::mechanics::walking::WalkingSimState"]},{"text":"impl Clone for Pedestrian","synthetic":false,"types":["sim::mechanics::walking::Pedestrian"]},{"text":"impl Clone for PedState","synthetic":false,"types":["sim::mechanics::walking::PedState"]},{"text":"impl Clone for PandemicModel","synthetic":false,"types":["sim::pandemic::pandemic::PandemicModel"]},{"text":"impl Clone for Cmd","synthetic":false,"types":["sim::pandemic::pandemic::Cmd"]},{"text":"impl<T: Clone + Ord> Clone for SharedSpace<T>","synthetic":false,"types":["sim::pandemic::pandemic::SharedSpace"]},{"text":"impl Clone for AnyTime","synthetic":false,"types":["sim::pandemic::AnyTime"]},{"text":"impl Clone for StateEvent","synthetic":false,"types":["sim::pandemic::StateEvent"]},{"text":"impl Clone for Event","synthetic":false,"types":["sim::pandemic::Event"]},{"text":"impl Clone for State","synthetic":false,"types":["sim::pandemic::State"]},{"text":"impl Clone for DrawPedestrianInput","synthetic":false,"types":["sim::render::DrawPedestrianInput"]},{"text":"impl Clone for PedCrowdLocation","synthetic":false,"types":["sim::render::PedCrowdLocation"]},{"text":"impl Clone for DrawCarInput","synthetic":false,"types":["sim::render::DrawCarInput"]},{"text":"impl Clone for CarStatus","synthetic":false,"types":["sim::render::CarStatus"]},{"text":"impl Clone for Router","synthetic":false,"types":["sim::router::Router"]},{"text":"impl Clone for Goal","synthetic":false,"types":["sim::router::Goal"]},{"text":"impl Clone for Command","synthetic":false,"types":["sim::scheduler::Command"]},{"text":"impl Clone for CommandType","synthetic":false,"types":["sim::scheduler::CommandType"]},{"text":"impl Clone for Item","synthetic":false,"types":["sim::scheduler::Item"]},{"text":"impl Clone for Scheduler","synthetic":false,"types":["sim::scheduler::Scheduler"]},{"text":"impl Clone for Sim","synthetic":false,"types":["sim::sim::Sim"]},{"text":"impl Clone for SimOptions","synthetic":false,"types":["sim::sim::SimOptions"]},{"text":"impl Clone for AlertHandler","synthetic":false,"types":["sim::sim::AlertHandler"]},{"text":"impl Clone for Stop","synthetic":false,"types":["sim::transit::Stop"]},{"text":"impl Clone for Route","synthetic":false,"types":["sim::transit::Route"]},{"text":"impl Clone for Bus","synthetic":false,"types":["sim::transit::Bus"]},{"text":"impl Clone for BusState","synthetic":false,"types":["sim::transit::BusState"]},{"text":"impl Clone for TransitSimState","synthetic":false,"types":["sim::transit::TransitSimState"]},{"text":"impl Clone for TripManager","synthetic":false,"types":["sim::trips::TripManager"]},{"text":"impl Clone for Trip","synthetic":false,"types":["sim::trips::Trip"]},{"text":"impl Clone for TripInfo","synthetic":false,"types":["sim::trips::TripInfo"]},{"text":"impl Clone for TripLeg","synthetic":false,"types":["sim::trips::TripLeg"]},{"text":"impl Clone for TripMode","synthetic":false,"types":["sim::trips::TripMode"]},{"text":"impl Clone for TripEndpoint","synthetic":false,"types":["sim::trips::TripEndpoint"]},{"text":"impl Clone for Person","synthetic":false,"types":["sim::trips::Person"]},{"text":"impl Clone for PersonState","synthetic":false,"types":["sim::trips::PersonState"]},{"text":"impl Clone for CarID","synthetic":false,"types":["sim::CarID"]},{"text":"impl Clone for PedestrianID","synthetic":false,"types":["sim::PedestrianID"]},{"text":"impl Clone for AgentID","synthetic":false,"types":["sim::AgentID"]},{"text":"impl Clone for AgentType","synthetic":false,"types":["sim::AgentType"]},{"text":"impl Clone for TripID","synthetic":false,"types":["sim::TripID"]},{"text":"impl Clone for PersonID","synthetic":false,"types":["sim::PersonID"]},{"text":"impl Clone for OrigPersonID","synthetic":false,"types":["sim::OrigPersonID"]},{"text":"impl Clone for VehicleType","synthetic":false,"types":["sim::VehicleType"]},{"text":"impl Clone for Vehicle","synthetic":false,"types":["sim::Vehicle"]},{"text":"impl Clone for VehicleSpec","synthetic":false,"types":["sim::VehicleSpec"]},{"text":"impl Clone for ParkingSpot","synthetic":false,"types":["sim::ParkingSpot"]},{"text":"impl Clone for ParkedCar","synthetic":false,"types":["sim::ParkedCar"]},{"text":"impl Clone for DrivingGoal","synthetic":false,"types":["sim::DrivingGoal"]},{"text":"impl Clone for SidewalkSpot","synthetic":false,"types":["sim::SidewalkSpot"]},{"text":"impl Clone for SidewalkPOI","synthetic":false,"types":["sim::SidewalkPOI"]},{"text":"impl Clone for TimeInterval","synthetic":false,"types":["sim::TimeInterval"]},{"text":"impl Clone for DistanceInterval","synthetic":false,"types":["sim::DistanceInterval"]},{"text":"impl Clone for CreatePedestrian","synthetic":false,"types":["sim::CreatePedestrian"]},{"text":"impl Clone for CreateCar","synthetic":false,"types":["sim::CreateCar"]}]; diff --git a/rustdoc/kml/struct.ExtraShape.html b/rustdoc/kml/struct.ExtraShape.html index 985dbb8c92..f0266910c9 100644 --- a/rustdoc/kml/struct.ExtraShape.html +++ b/rustdoc/kml/struct.ExtraShape.html @@ -1,8 +1,10 @@ -kml::ExtraShape - Rust

[][src]Struct kml::ExtraShape

pub struct ExtraShape {
+kml::ExtraShape - Rust

[][src]Struct kml::ExtraShape

pub struct ExtraShape {
     pub points: Vec<LonLat>,
     pub attributes: BTreeMap<String, String>,
 }

- Fields

points: Vec<LonLat>attributes: BTreeMap<String, String>

Trait Implementations

impl Debug for ExtraShape[src]

 mod clip;
 mod extract;
 mod parking;
 mod reader;
+mod snappy;
 mod split_ways;
 mod srtm;
 mod transit;
@@ -246,6 +250,8 @@
         use_elevation(&mut map, path, timer);
     }
 
+    snappy::snap_cycleways(&mut map, timer);
+
     map.config = opts.map_config;
     map
 }
diff --git a/rustdoc/src/convert_osm/snappy.rs.html b/rustdoc/src/convert_osm/snappy.rs.html
new file mode 100644
index 0000000000..122a11ac5f
--- /dev/null
+++ b/rustdoc/src/convert_osm/snappy.rs.html
@@ -0,0 +1,311 @@
+snappy.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+
+use abstutil::MultiMap;
+use abstutil::Timer;
+use geom::{Distance, FindClosest, Line, PolyLine};
+use kml::{ExtraShape, ExtraShapes};
+use map_model::osm::WayID;
+use map_model::raw::{OriginalRoad, RawMap};
+use map_model::{osm, Direction};
+use std::collections::{BTreeMap, HashMap, HashSet};
+
+// Attempt to snap separately mapped cycleways to main roads. Emit extra KML files to debug later.
+pub fn snap_cycleways(map: &RawMap, timer: &mut Timer) {
+    let mut cycleways = HashMap::new();
+    for shape in abstutil::read_binary::<ExtraShapes>(
+        abstutil::path(format!("input/{}/footways.bin", map.city_name)),
+        timer,
+    )
+    .shapes
+    {
+        // Just cycleways for now. This same general strategy should later work for sidewalks,
+        // tramways, and blockface parking too.
+        if shape.attributes.get("highway") == Some(&"cycleway".to_string()) {
+            cycleways.insert(
+                WayID(shape.attributes[osm::OSM_WAY_ID].parse().unwrap()),
+                shape,
+            );
+        }
+    }
+
+    let mut road_edges: HashMap<(OriginalRoad, Direction), PolyLine> = HashMap::new();
+    for (id, r) in &map.roads {
+        if r.is_light_rail() || r.is_footway() {
+            continue;
+        }
+        let (pl, total_width) = r.get_geometry(*id, map.config.driving_side);
+        road_edges.insert(
+            (*id, Direction::Fwd),
+            pl.must_shift_right(total_width / 2.0),
+        );
+        road_edges.insert(
+            (*id, Direction::Back),
+            pl.must_shift_left(total_width / 2.0),
+        );
+    }
+
+    let matches = v1(map, &cycleways, &road_edges);
+    // TODO A v2 idea: just look for cycleways strictly overlapping a thick road polygon
+    dump_output(map, &cycleways, &road_edges, matches);
+}
+
+fn dump_output(
+    map: &RawMap,
+    cycleways: &HashMap<WayID, ExtraShape>,
+    road_edges: &HashMap<(OriginalRoad, Direction), PolyLine>,
+    matches: MultiMap<(OriginalRoad, Direction), WayID>,
+) {
+    let mut separate_cycleways = ExtraShapes { shapes: Vec::new() };
+    let mut snapped_cycleways = ExtraShapes { shapes: Vec::new() };
+
+    let mut used_cycleways = HashSet::new();
+    for ((r, dir), ids) in matches.consume() {
+        let mut attributes = BTreeMap::new();
+        used_cycleways.extend(ids.clone());
+        attributes.insert(
+            "cycleways".to_string(),
+            ids.into_iter()
+                .map(|x| x.to_string())
+                .collect::<Vec<_>>()
+                .join(", "),
+        );
+        snapped_cycleways.shapes.push(ExtraShape {
+            points: map.gps_bounds.convert_back(road_edges[&(r, dir)].points()),
+            attributes,
+        });
+    }
+
+    for (id, shape) in cycleways {
+        if !used_cycleways.contains(id) {
+            separate_cycleways.shapes.push(shape.clone());
+        }
+    }
+
+    abstutil::write_binary(
+        abstutil::path(format!(
+            "input/{}/{}_separate_cycleways.bin",
+            map.city_name, map.name
+        )),
+        &separate_cycleways,
+    );
+    abstutil::write_binary(
+        abstutil::path(format!(
+            "input/{}/{}_snapped_cycleways.bin",
+            map.city_name, map.name
+        )),
+        &snapped_cycleways,
+    );
+}
+
+// Walk along every cycleway, form a perpendicular line, and mark all road edges that it hits.
+//
+// TODO Inverse idea: Walk every road, project perpendicular from each of the 4 corners and see what
+// cycleways hit.
+//
+// TODO Should we run this before splitting ways? Possibly less work to do.
+fn v1(
+    map: &RawMap,
+    cycleways: &HashMap<WayID, ExtraShape>,
+    road_edges: &HashMap<(OriginalRoad, Direction), PolyLine>,
+) -> MultiMap<(OriginalRoad, Direction), WayID> {
+    let mut matches: MultiMap<(OriginalRoad, Direction), WayID> = MultiMap::new();
+
+    let mut closest: FindClosest<(OriginalRoad, Direction)> =
+        FindClosest::new(&map.gps_bounds.to_bounds());
+    for (id, pl) in road_edges {
+        closest.add(*id, pl.points());
+    }
+
+    // TODO If this is too large, we might miss some intermediate pieces of the road.
+    let step_size = Distance::meters(5.0);
+    // This gives the length of the perpendicular test line
+    let cycleway_half_width = Distance::meters(3.0);
+    // How many degrees difference to consider parallel ways
+    let parallel_threshold = 30.0;
+    for (cycleway_id, cycleway) in cycleways {
+        let pl = PolyLine::must_new(map.gps_bounds.convert(&cycleway.points));
+
+        let mut dist = Distance::ZERO;
+        loop {
+            let (pt, cycleway_angle) = pl.must_dist_along(dist);
+            let perp_line = Line::must_new(
+                pt.project_away(cycleway_half_width, cycleway_angle.rotate_degs(90.0)),
+                pt.project_away(cycleway_half_width, cycleway_angle.rotate_degs(-90.0)),
+            );
+            for (id, _, _) in closest.all_close_pts(perp_line.pt1(), cycleway_half_width) {
+                if let Some((_, road_angle)) =
+                    road_edges[&id].intersection(&perp_line.to_polyline())
+                {
+                    if road_angle.approx_eq(cycleway_angle, parallel_threshold) {
+                        matches.insert(id, *cycleway_id);
+                        // TODO Just stop at the first hit?
+                        break;
+                    }
+                }
+            }
+
+            if dist == pl.length() {
+                break;
+            }
+            dist += step_size;
+            dist = dist.min(pl.length());
+        }
+    }
+
+    matches
+}
+
+
\ No newline at end of file diff --git a/rustdoc/src/game/devtools/kml.rs.html b/rustdoc/src/game/devtools/kml.rs.html index 61558b389e..dd1f205773 100644 --- a/rustdoc/src/game/devtools/kml.rs.html +++ b/rustdoc/src/game/devtools/kml.rs.html @@ -357,6 +357,9 @@ 357 358 359 +360 +361 +362
 use crate::app::App;
 use crate::colors::ColorScheme;
@@ -549,7 +552,10 @@
                             .collect(),
                         ),
                         Box::new(|path, ctx, app| {
-                            Transition::Replace(ViewKML::new(ctx, app, Some(path)))
+                            Transition::Multi(vec![
+                                Transition::Pop,
+                                Transition::Replace(ViewKML::new(ctx, app, Some(path))),
+                            ])
                         }),
                     ));
                 }
diff --git a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-9f4de26f0a0787cb/out/built.rs.html b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-9f4de26f0a0787cb/out/built.rs.html
index 646124ec05..494372cc29 100644
--- a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-9f4de26f0a0787cb/out/built.rs.html
+++ b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-9f4de26f0a0787cb/out/built.rs.html
@@ -111,7 +111,7 @@
 /// The output of `rustdoc -V`
 pub const RUSTDOC_VERSION: &str = "rustdoc 1.46.0 (04488afe3 2020-08-24)";
 /// The built-time in RFC2822, UTC
-pub const BUILT_TIME_UTC: &str = "Fri, 25 Sep 2020 22:26:13 +0000";
+pub const BUILT_TIME_UTC: &str = "Fri, 25 Sep 2020 22:39:00 +0000";
 /// The target architecture, given by `cfg!(target_arch)`.
 pub const CFG_TARGET_ARCH: &str = "x86_64";
 /// The endianness, given by `cfg!(target_endian)`.
diff --git a/rustdoc/src/kml/lib.rs.html b/rustdoc/src/kml/lib.rs.html
index a56e25292a..774e3c3095 100644
--- a/rustdoc/src/kml/lib.rs.html
+++ b/rustdoc/src/kml/lib.rs.html
@@ -134,7 +134,7 @@
     pub shapes: Vec<ExtraShape>,
 }
 
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Clone, Debug, Serialize, Deserialize)]
 pub struct ExtraShape {
     pub points: Vec<LonLat>,
     pub attributes: BTreeMap<String, String>,
diff --git a/rustdoc/src/map_model/raw.rs.html b/rustdoc/src/map_model/raw.rs.html
index 37570941ba..1e9b419cf2 100644
--- a/rustdoc/src/map_model/raw.rs.html
+++ b/rustdoc/src/map_model/raw.rs.html
@@ -641,7 +641,7 @@
 }
 
 impl RawRoad {
-    // Returns the corrected center and half width
+    // Returns the corrected center and total width
     pub fn get_geometry(
         &self,
         id: OriginalRoad,