Commit Graph

2967 Commits

Author SHA1 Message Date
Dustin Carlino
f6e4c9b08e
Concave hull, you're drunk, go home (#792)
Add map_model Blocks and RoadLoops
2021-10-27 13:19:13 -07:00
Dustin Carlino
2ee2b991f4 Convert other non-UI things from CmdArgs to structopt. #745
structopt is forcing some hacks, but oh well.

There are some docs to update in the other repo, will get to that
soon...
2021-10-26 12:02:40 -07:00
Dustin Carlino
cf3d00f234 Fix the --diff map feature, broken by 57584a61b9 2021-10-25 13:51:01 -07:00
Dustin Carlino
007cf0b28d Split the importer into individual commands with structopt. #745 2021-10-25 13:02:00 -07:00
Dustin Carlino
57584a61b9
For Ungap's route mode, add a button to toggle back and forth between (#783)
the original and edited map. This is an easy way to evaluate how a
proposal influences a particular route.
2021-10-24 12:32:08 -07:00
Dustin Carlino
cce8c6c078 Remove the warning about out-of-date versions after 2 weeks. I'm gradually ending the promise of weekly releases. 2021-10-24 12:28:58 -07:00
Dustin Carlino
a75f874dbf Always load map edits permissively -- if there are broken commands, just
skip them.

This partly works around a bug loading remote edits from r/seattlebike.
The workaround isn't great, because the edits there are uncompressed --
there are multiple commands modifying the same road. The workaround will
ignore all but the first version.
2021-10-22 10:29:00 -07:00
Dustin Carlino
9f86365cf6 Upgrade to rust 1.56 and cutover to rust edition 2021 2021-10-21 09:38:06 -07:00
Dustin Carlino
49b2e6778d
Consolidate Ungap editing experience in the appropriate mode (#785)
Move proposal management from explore to edit pane

Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>

Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>
2021-10-20 12:39:42 -07:00
Dustin Carlino
002b41816d Actually, generalize UnzoomedLines to handle circles too. Make the route sketcher nicer to use at all zoom levels! 2021-10-18 17:54:58 -07:00
Dustin Carlino
749a7384c1 Make the route sketcher tool use UnzoomedLines, making it much easier to see the route on large maps.
Note the draggable waypoint circles are still a fixed size; you can't
easily manipulate the route when unzoomed far.
2021-10-18 17:54:58 -07:00
Dustin Carlino
b5cca3f18c Refactor a helper to draw unzoomed thick lines at a constant width.
To start, just make the bike network use this.
2021-10-18 17:54:58 -07:00
Dustin Carlino
a643c35014 Long overdue round of clippy 2021-10-18 13:52:10 -07:00
Dustin Carlino
a85915f647 Refine high_stress_for_bikes to take direction into account. Northbound bike lanes on Roosevelt don't really matter when going southbound.
Regenerate all maps, since this maybe affects edge weights.

And try some ideas for understanding why files change.
2021-10-18 13:41:31 -07:00
Dustin Carlino
981b421bd9 Consistently use imperial units for the barrier dropdown. Bug spotted by Tobias! 2021-10-14 10:59:34 -07:00
Michael Kirk
41060572c0 Space tab header/content more cohesively 2021-10-12 11:35:00 -07:00
Michael Kirk
871cbf7ecf Only enable controls when they do something 2021-10-12 10:21:12 -07:00
Dustin Carlino
3493c834af Be a little more clear in the quick sketch tool that we shouldn't expand road width 2021-10-12 09:24:00 -07:00
Dustin Carlino
8e1f34995b Make maybe_add_bike_lanes not create duplicate lanes when editing a road that already has them! 2021-10-12 09:17:43 -07:00
Dustin Carlino
876eff87dd Recalculate pathfinding at the right time, now that changing to the trip page can immediately trigger pathfinding 2021-10-12 09:05:28 -07:00
Dustin Carlino
d050c885c8 Brand the bike tool -- ungap the map, after all!
And print big numbers consistently for mode shift
2021-10-11 20:44:22 -07:00
Michael Kirk
56323116e1 Don't show details widget until 2+ waypoints
Otherwise there's no route, also this helps focus on the "add waypoint"
instructions.
2021-10-11 19:42:03 -07:00
Michael Kirk
f1f895eab2 Remember "current trip" when switching tabs 2021-10-11 19:42:03 -07:00
Michael Kirk
56c5bf31bd autosave trips 2021-10-11 19:42:03 -07:00
Dustin Carlino
5f83f5b46b Include my own Seattle bike network vision as a built-in proposal. #743
To avoid needing 3 copies of the proposal for different splits of the
map, make loading edits "permissive" (filtering out unknown roads) when
loading from proposals.
2021-10-11 17:34:14 -07:00
Michael Kirk
5e592447b7 organize trip controls vs. route controls
The file mgmt and waypoints are part of the "trip"

The toggles and details are part of the route. I considered combining
the toggle section into the "route details" section but... decided
against it to delineate "input" from "output". I could be persuaded to
keep iterating on this...
2021-10-11 16:03:05 -07:00
Michael Kirk
738c4ab865 clean up set_hovering tooltip style 2021-10-11 16:03:05 -07:00
Michael Kirk
8fd63f00db what goes up must come down
Showing both the change in climb and then change in descent is
redundant, since they'll always be equal given the same start/end.
2021-10-11 16:03:05 -07:00
Dustin Carlino
915b902c9a
Warn the user before doing expensive mode shift calculations. #448 (#774) 2021-10-11 15:10:28 -07:00
Dustin Carlino
112848f23b
Some quick last UX fixes to the bike tool: #743 (#773)
- after adding lanes, stay on the quick sketch page
- be clear people are uploading proposals in the public domain
- link to docs about mode shift
2021-10-11 15:06:34 -07:00
Michael Kirk
476f19142f
Consistent panel width (#772)
* reorder tabs: plan trip before adding lanes

This order of tasks should be more logical for most people.

* Copy tweaks

"trip" is better than "route" since you don't pick the route, only the
start/end points. The route is inferred based on the available roads.

* Smaller elevation plot

it was much wider than any other UI element, meaning the column
dramatically jumps sizes when switching to this tab.

* better align line-plot x-axis

* Avoid jittering UI while switching through tabs.

* fixup! Avoid jittering UI while switching through tabs.

* fixup! Copy tweaks

* fixup! reorder tabs: plan trip before adding lanes

* fixup! Copy tweaks
2021-10-11 15:02:41 -07:00
Dustin Carlino
be9ba5a80e Clean up the absurd number of Seattle maps. Ideally we'd have some way
to further organize them by purpose, but for the moment, two problems:

1) the city picker UI is getting way too crowded
2) on native, the initial download is up to 145MB

Removing:

- the 3 Aurora maps and Green Lake, added for the ARC workshop, but no
  longer the most active of collaborations
- Ballard is now subsumed by central Seattle -- the only advantage would
  be keeping its full scenario of walking and transit trips, but the
  simulation is horribly gridlocked there anyway
- the Rainier Valley map, originally meant for an SNG traffic light
  timing study
- the larger udistrict map
2021-10-11 14:37:59 -07:00
Dustin Carlino
da195f07dd Prevent crash in quick sketch, when there's only one waypoint set and the user drags it. #743 2021-10-11 12:08:18 -07:00
Dustin Carlino
f011461d6c
Change the styling for edited bike network roads -- just use bright c… (#771)
Change the styling for edited bike network roads -- just use bright cyan, not a texture on top of the different greens. Change route colors to not conflict with the cyan changed lanes. Adjust route waypoint colors too.
2021-10-09 12:31:35 -07:00
Dustin Carlino
5f75656cc3 Exclude light rail from steep streets layer 2021-10-08 14:31:52 -07:00
Dustin Carlino
a85ec6cccd Nest DrawLanes within DrawRoads. This is a followup to #747, motivated
by squeezing some start-up performance of huge maps. #746

Shaving at least 1 second off quadtree initialization in huge_seattle
from this, no noticeable effects otherwise.
2021-10-08 08:34:02 -07:00
Dustin Carlino
99876d245f Add the new proposal sharing feature to A/B Street's edit mode too! #765 2021-10-07 11:08:09 -07:00
Dustin Carlino
031cc0fe9d Make the quick sketch handle divided one-ways more reasonably. #743
Previously, the undirected graph search would switch sides sporadically.
Now it sticks to one side.

Now we probably just need an option to also include the other direction,
to avoid having to sketch over Aurora twice.
2021-10-06 14:14:59 -07:00
Dustin Carlino
4c2165f5cb Whoops, didn't actually include the reset button promised by previous commit. #743 2021-10-06 12:47:09 -07:00
Dustin Carlino
2936804f8f Make the quick sketch UI less clunky. #743
Let the map be panned even when we're snapped to an intersection.
Previously it's super obnoxious to start drawing a route in a huge map.
Also I'd love to switch to the new World API and stop with this ad-hoc
logic, but slightly confused about how to do that here...

Also add a reset button, otherwise I just switch tabs to force a reset,
which is silly.
2021-10-06 12:37:06 -07:00
Dustin Carlino
ca96be7c08 Fix spinners in mode shift tool. Always use feet, so the step size doesn't render in a silly way. #448 2021-10-06 12:04:28 -07:00
Dustin Carlino
d791f0dd48 Simplify routing preferences -- just checkboxes for avoiding hills or stress.#743 2021-10-06 10:26:21 -07:00
Dustin Carlino
2550f60c8b Simplify mode shift tool. Max biking time and elevation are the interesting knobs to turn. Biking distance is pretty related to biking time. And driving time is irrelevant for people considering a switch. #448
Also adjust initial elevation gain max from 30 to 100 feet
2021-10-06 09:47:24 -07:00
Dustin Carlino
28a4fb6fd2 Cutover to the prod proposal API, now that it's working! 2021-10-05 15:07:41 -07:00
Dustin Carlino
309db511c2 Record timing while applying map edits. Even in release mode, this is a long inexplicable pause for large-scale bike network changes. A loading screen is better. 2021-10-05 11:35:37 -07:00
Dustin Carlino
76b0ef2159 Change the share feature to live on a dedicated panel, with more disclaimers and ways to copy the URL. #765 2021-10-05 09:09:33 -07:00
Dustin Carlino
ea0440b6b2 Import fresh Seattle OSM, with the new Northgate station and bridge!
lakeslice gridlocks, because a traffic signal marked on a footway near
23rd and Judkins gets assigned to an alleyway. Worth fixing later.

And wallingford crashes the sim; I think more lane-changing bugs
exposed. It's kind of freeing to not worry about maintaining the
simulation right now...
2021-10-04 18:35:42 -07:00
Dustin Carlino
9f708354d8 Revive the feature to share proposals in the bike network tool. #765
Explicitly mark the edits as remote in the URL, and refresh the URL +
panel after sharing.
2021-10-04 15:16:28 -07:00
Dustin Carlino
eb9c4df3f2 Add a button to export throughput data to CSV 2021-10-04 08:09:00 -07:00
Dustin Carlino
066bdf0b8a Convert the collisions viewer to World. #763 2021-10-03 20:59:33 -07:00
Dustin Carlino
ddbadd2da3 Make waypoints and routes coexist in the same World. #763 [rebuild] [release]
The pattern is somewhat similar to how different components share a
Panel. The "outer-most" piece owns the World, calls into InputWaypoints
to fill out the World, and plumbs un-handled events to it.

Also handle a tricky low-level bug with ctx.normal_left_click() and
detecting drags vs clicks.

Now finally there's no buggy conflicts between dragging waypoints and
hovering on the alternate routes!
2021-10-03 14:28:44 -07:00
Dustin Carlino
41465c341b Convert the new bike routing tool to use World. #763
This one is the most complicated, and it's still not done, but it's not
any buggier than the ad-hoc implementation. I still need to figure out
how to merge the two worlds of waypoints and routes.

This one also required a large, but mechanical, refactor to lift
ToggleZoomed and the concept of unzoomed/zoomed from map_gui to
widgetry.
2021-10-03 14:28:44 -07:00
Dustin Carlino
43f8a6d1e7 Convert the signal demand dashboard to World. #763 2021-10-03 14:28:44 -07:00
Dustin Carlino
5a37e223c0 Cut over the story map tool to the brave new World. #763
Figure out how to make objects both clickable and draggable!
2021-10-03 14:28:44 -07:00
Dustin Carlino
8524cfce12 Create a new map-space World abstraction, and change the polygon editor to use it. #763 2021-10-03 14:28:44 -07:00
Dustin Carlino
e17e48a764 Adjust LTN modal filter placement near the perimeter roads 2021-10-02 10:24:24 -07:00
Dustin Carlino
2288b0d42a Add a smaller study area in Tehran.
- Procedurally generate houses there, so the automatic travel demand
  model doesn't produce totally silly patterns.
- Disable parking
- Allow vehicles to enter the intersection even when it looks like they
  might get stuck; this lets the default scenario complete without
  gridlock.
- Prebake the scenario, so a researcher can make edits and use all of
  the A/B testing data viz.

The home-to-work scenario produces laughably bogus patterns... everyone
working at Bank Sepah.
2021-09-30 14:51:56 -07:00
Dustin Carlino
5d93671ae3 Allow editing service roads that're bus-only. User reported an example in Tehran 2021-09-30 13:55:55 -07:00
Dustin Carlino
4ddfe66afd Finally clean up txt.with_bg. The last few uses were actually illegible from the default color! 2021-09-29 13:34:46 -07:00
Dustin Carlino
2905ca605d Cache the Dijkstra pathfinder for custom RoutingParams. This dramatically speeds up the bike network routing tool, since it's now restricted to just a few params. #743 2021-09-29 11:38:18 -07:00
Dustin Carlino
7672cc3ced 3-value dropdowns for routing preferences, not a crazy continuous slider. And now multiple alt routes! #743
But deduping routes isn't great; many alts mostly cover up the main route
2021-09-29 09:29:55 -07:00
Dustin Carlino
9a7b9e2b60 Click to switch routes! #743
Some quirks, but finally got this working.
2021-09-29 08:16:31 -07:00
Dustin Carlino
3cf75063c3 Prepare for switching to alt routes. #743
- workaround dragging / clicking conflicts
- make AltRouteResults wrap RouteResults
- plumb names/params around
2021-09-29 07:57:08 -07:00
Dustin Carlino
62be41f2c1 Skip alt routes if they're no different than the main. #743 2021-09-28 11:15:16 -07:00
Dustin Carlino
4ae3a1076f Show comparison stats in the alternate route's tooltip. #743 2021-09-28 09:40:45 -07:00
Dustin Carlino
9f5b51d784 Just split route code up a bit. #743 2021-09-27 14:33:33 -07:00
Dustin Carlino
40b018e1bc The last of ToggleZoomed conversion! 2021-09-27 14:21:59 -07:00
Dustin Carlino
59a6b4e546 Move over more places to ToggleZoomed 2021-09-27 14:06:03 -07:00
Dustin Carlino
83fdf1b6e6 Refactor: drawing two things, based on zoom level.
Just a small start to switching stuff to this; this pattern profilerated
EVERYWHERE.
2021-09-27 13:41:19 -07:00
Dustin Carlino
c4d38ca591 A humble start to showing an alternate, low-stress route. #743 2021-09-27 13:13:11 -07:00
Dustin Carlino
70a09659ea Recalculate mode shift when map is edited #448 2021-09-27 12:35:22 -07:00
Dustin Carlino
e8018c93e6 Disable the predict impact tab on maps without scenarios. #448 2021-09-27 12:22:58 -07:00
Dustin Carlino
2c6f218b22 Refactor a button to change maps 2021-09-27 12:16:01 -07:00
Dustin Carlino
ceed02b7d4 Browse all neighborhoods for the LTN tool [rebuild] [release] 2021-09-26 13:53:13 -07:00
Dustin Carlino
7fccf09f45 Fill in gaps in LTN rendering 2021-09-26 13:16:51 -07:00
Dustin Carlino
fbc10f2c71 Small UI adjustments to the route tool, to make info hierarchy slightly more clear.
And make the "explore" mode point to layers more clearly
2021-09-26 12:27:04 -07:00
Dustin Carlino
d365213948 Small refactor: {road, lane}.length() 2021-09-26 11:08:44 -07:00
Dustin Carlino
baa41ae5cc Prevent some crashes in the LTN tool. The way things are defined now,
can't start a neighborhood on a non-local road.
2021-09-24 15:28:43 -07:00
Dustin Carlino
8a9c71735e And the last bit of glue, toggling simple modal filters on road segments 2021-09-24 15:28:43 -07:00
Dustin Carlino
8470403d74 Start LTN tool from the command line. Add a map switcher, so it's usable
standalone.

(It might be worth splitting this out to a separate crate, but not yet)

Also refactor the fading from some of the colorer tools
2021-09-24 15:28:43 -07:00
Dustin Carlino
72e2b39301 Rank rat-run likeliness by a simple distance heuristic 2021-09-24 15:28:43 -07:00
Dustin Carlino
0e869b35c0 Detect some rat runs 2021-09-24 15:28:43 -07:00
Dustin Carlino
37c1145df4 Begin an LTN experiment. Starting from a single point, auto-discover the neighborhood and perimeter roads. 2021-09-24 15:28:43 -07:00
Dustin Carlino
f17f4c2731 The mode shift funnel. #448 2021-09-21 15:19:18 -07:00
Dustin Carlino
e571ce3703 Don't crash when elevation enabled, but layers panel hidden 2021-09-21 10:29:22 -07:00
Dustin Carlino
4782dac84b Hide layers panel by default, but also make it more easily toggleable. #743 2021-09-21 10:26:58 -07:00
Dustin Carlino
0d01906b08 Start rearranging the left panel, per Mara's design. #743 2021-09-21 10:14:16 -07:00
Dustin Carlino
632a527dbc Consolidate the route results panel on the left side, as a first step towards Mara's design. #743 2021-09-21 09:09:34 -07:00
Dustin Carlino
774c068d9e Track total mileage of mode shifted trips. Plug into a simple carbon formula! #448 2021-09-20 17:43:07 -07:00
Dustin Carlino
f06685ff20 Counting the number of mode shift trips that would make use of proposed edits. #448
Not updating when making edits yet, though!
2021-09-20 16:16:14 -07:00
Dustin Carlino
f14b7eb9e7 Calculating and showing network gaps, wiring up filters. #448 2021-09-20 14:42:02 -07:00
Dustin Carlino
3945528cf5 Start a 4th mode for the bike network tool: predicting impact, aka, mode-shift. #448
Just load the scenario and scrape data from it, to start.
2021-09-20 10:07:58 -07:00
Gedalia Kott
d833f82c73 Fix Issue #692:settings for metric VS imperial distance units are repsected for distance 2021-09-18 14:06:32 -07:00
Gedalia Kott
19d74b46ac simplify waypoints since much of its state can be computed lazily 2021-09-18 13:11:24 -07:00
Gedalia Kott
a851b1e52d removes position enum, abstracts the way we assign text to waypoint icons, and cleans up syntax noise 2021-09-18 13:11:24 -07:00
Gedalia Kott
dc5398fa14 update the route panel waypoint icons with the same color as the map waypoints 2021-09-18 13:11:24 -07:00
Gedalia Kott
6030c1091e refactor to remove idx and order from waypoint and instead interpret through containing vector 2021-09-18 13:11:24 -07:00
Gedalia Kott
21464f6034 complete implementation to change color of waypoints depending on the position in the list of waypoints 2021-09-18 13:11:24 -07:00
Gedalia Kott
7074fd2eb7 WIP: updates route waypoints with unique colors and static start and end colors 2021-09-18 13:11:24 -07:00
Dustin Carlino
2fc9010b1e Fix some clippy warnings 2021-09-17 18:31:30 -07:00
Dustin Carlino
642c87a845 Fix up references to the CLI tools in shell scripts and code. #745
[rebuild]
2021-09-17 18:29:23 -07:00
Dustin Carlino
6b76c1b195 Bring the controls to avoid hills/stressful roads from the route debugger into the new route tool. It's actually easier to parameter tune here, since drawing and saving routes is polished here. #743 2021-09-17 13:28:32 -07:00
Dustin Carlino
b0fe0f2a65 Fix prev/next route when we're starting on an unsaved route. #743 2021-09-17 12:36:14 -07:00
Dustin Carlino
765335b0da Show unprotected turns along route. #743 2021-09-17 12:32:17 -07:00
Dustin Carlino
cca701fb3e Show traffic signals along route. #743 2021-09-17 12:27:00 -07:00
Dustin Carlino
14ce21c80d Show high-stress roads in route. #743 2021-09-16 13:44:03 -07:00
Dustin Carlino
797bb82c41 Rename routes. #743 2021-09-16 12:46:39 -07:00
Dustin Carlino
824e9df5e9 Fix bike quick sketch tool in left-handed maps. #743 2021-09-13 13:14:26 -07:00
Dustin Carlino
11bd4ea209 Show elevation on the map directly while hovering. #743 [rebuild]
[release]
2021-09-12 10:28:54 -07:00
Dustin Carlino
503a3e8a9e Slightly reorganize route panel to stop eating all of the screen width.
Make the drawn route a bit transparent when zoomed in.
2021-09-12 08:38:49 -07:00
Michael Kirk
577192bb89 style row header 2021-09-10 15:17:15 -07:00
Michael Kirk
3b1ed1f82f fix button v alignment,
Also: use standard interaction color when dragging, not the primary
orange color.
2021-09-10 15:17:15 -07:00
Michael Kirk
84b3d87c37 refactor uninted to be builder method, not constructor. it composes better this way 2021-09-10 15:17:15 -07:00
Michael Kirk
a0ea2ba14e use btn_close instead of "X"s 2021-09-10 15:17:15 -07:00
Dustin Carlino
2387975fac Fix crash in road editor when changing speed limit while not selecting any lane. 2021-09-10 14:24:11 -07:00
Dustin Carlino
2598f2a15d Workaround spinners with f64s that wind up with 0.0000001 drift 2021-09-08 08:00:49 -07:00
Dustin Carlino
27a712bcc3 Remove buttons from map_editor map loader -- very slow and not useful 2021-09-07 15:39:55 -07:00
Dustin Carlino
a8645bd9ed Refactor places setting camera from URL 2021-09-07 11:21:56 -07:00
Dustin Carlino
4068986c58 Refactor URLManager -- on errors, always warn 2021-09-07 11:14:31 -07:00
Dustin Carlino
570cd2de84 Make map_editor more web-friendly:
- adjust the panel
- hide some controls on the web
- keep the URL up-to-date with the map and camera
2021-09-07 11:00:27 -07:00
Dustin Carlino
d1e60c888a Handle broken RawMaps, which're more likely to happen in the web
deployment, since I'm not planning to version input data.

As part of this, prepare to lift the PopupMsg helper from map_gui to
widgetry, removing dependencies on AppLike.
2021-09-07 09:41:17 -07:00
Dustin Carlino
b7d010058c Store Movements per Intersection, instead of constantly calculating them! #746
Regenerating everything...
2021-09-06 14:53:37 -07:00
Dustin Carlino
6dcf417cd0 Fix some clippy warnings, and now regenerate everything...
Green Lake sim crashes, not investigating.

[rebuild] [release]
2021-09-05 19:53:10 -07:00
Dustin Carlino
9300470c6b Lane offset comes for free now 2021-09-05 19:53:10 -07:00
Dustin Carlino
442523ae6c Simplify some lane lookups that just needed to find the parent 2021-09-05 19:53:10 -07:00
Dustin Carlino
112bc38e0c Get rid of the now redundant lanes_ltr 2021-09-05 19:53:10 -07:00
Dustin Carlino
4c46510342 Cleaning up a few APIs, now that lanes belong to roads... 2021-09-05 19:53:10 -07:00
Dustin Carlino
0f4a31e915 Moving lanes from a BTreeMap to be stored inlined in their parent Roads. #746
Somewhat invasive API change internal to map_model, but not much impact
elsewhere.

Not regenerating anything yet.
2021-09-05 19:53:10 -07:00
Dustin Carlino
cea0ad2541 Change LaneID to encode (RoadID, offset), still in one u32. #746
Not regenerating yet.
2021-09-05 19:53:10 -07:00
Dustin Carlino
8c2c0e2e65 Start some new RoutingParams for bikes to avoid steep hills and
stressful roads. Initially experiment in the route debugger UI. #743

This is a binary map format change, but temporarily working around
that...
2021-09-05 17:04:54 -07:00
Dustin Carlino
b231ba602f Drag-n-drop for waypoints! #743
Also some drag-n-drop API tweaks:
- Don't require the caller to set `named()`
- Vertical card layout!

Some UX issues:
- deletion button alignment
- horizontal card alignment off
- sync up highlighting between map and cards
- selection state for a waypoint is meaningless
2021-09-03 13:23:17 -07:00
Dustin Carlino
2234c52cc6 Allow routes to be saved in the bike network tool. #743
Some UX clunkiness:
- not allowing custom names yet
- no autosave
- the left/right arrows can silently eat the current route
2021-09-03 12:23:58 -07:00
Dustin Carlino
1c756befa8 Hover on route, to show elevation on line plot. #743
Some messiness, but step forward.
2021-09-01 18:20:48 -07:00
Dustin Carlino
30a114a483 Improve the bike network tool's colors. Always draw the fog-of-war, and
highlight road types better.  #743
2021-09-01 17:07:57 -07:00
Dustin Carlino
e419ad4788 At least a start to the inverse: when hovering on the route, show the position along the elevation line plot. #743 2021-09-01 13:33:37 -07:00
Dustin Carlino
ba6f9f4a14 When hovering on the elevation line plot, show the equivalent position
on the route. #743
2021-09-01 13:18:30 -07:00
Dustin Carlino
d123322d0e Splitting out RouteResults too. #743 2021-09-01 12:10:11 -07:00
Dustin Carlino
470ac4f0a9 Split waypoint input management into its own component. Better
organization, insulates from the upcoming complexity increase for
viewing the route result, and paves the way for using this component in
something like a better tool for spawning a simulation agent to visit
waypoints. #743
2021-09-01 11:50:37 -07:00
Dustin Carlino
0587fa44d7 Fix delete waypoint buttons, broken by previous commit. #743 2021-09-01 11:11:16 -07:00
Dustin Carlino
c5671557de Improve route UI from feedback: click to add waypoints, instead of a button. #743 2021-08-31 12:47:57 -07:00
Dustin Carlino
e2fc59a31a Let the bike network tool's massive bottom right panel be minimized. Specialized an implementation just for this one case, not for Panels in general. 2021-08-30 10:58:16 -07:00
Dustin Carlino
69d965ea3e Use the new drag-drop widget for traffic signal editor stages! 2021-08-30 09:02:00 -07:00
Dustin Carlino
e924e9d7df Simplify the buttons for picking a stage in the traffic signal editor,
in preparation for dragon-drop.

These were using MultiButtons, a widgetry concept kind of redundant with
DrawWithTooltips. I think at some point we had more visual mapping
between the stage icon and the intersection on the map, to help when
synchronizing many intersections. But the functionality remaining today
just looks like clicking one intersection inside the icon, which is
barely noticeable and not helpful, so sacrifice this to proceed.
2021-08-30 08:41:29 -07:00
Dustin Carlino
1c9aaac17f Show drop position on the map while dragging lane cards 2021-08-29 16:40:54 -07:00
Dustin Carlino
7aae626fca Avoid crash in bike network layer when unzooming completely in huge_seattle 2021-08-26 17:13:51 -07:00
Dustin Carlino
8f93ff26b0 נשימת החיים: That skeleton is ready for the world. [rebuild] [release] [mic-drop] 2021-08-26 12:08:47 -07:00
Dustin Carlino
fb35c55cb9 Make quick sketch heuristic less wrong near bus lanes 2021-08-26 12:01:08 -07:00
Dustin Carlino
a5b905992e Ungap tweaks:
- use nonconflicting keybindings for the 3 tabs
- fix the vanishing steep street legend
2021-08-26 11:40:43 -07:00
Dustin Carlino
3a9246e3d0 Use cross-hatch pattern for the 'edit similar roads' tool; the previous color is basically invisible in the new color scheme 2021-08-26 11:28:31 -07:00
Dustin Carlino
deb4a202d9 Retain tab when changing maps 2021-08-26 10:17:08 -07:00
Dustin Carlino
5b7523b2c4 Split ExploreMap to a module 2021-08-26 10:05:43 -07:00
Dustin Carlino
0a03887eab Refactor common event handlers for the 3 modes 2021-08-26 09:56:41 -07:00
Dustin Carlino
57d1cba40c Share the logo / map changer in the 3 modes too 2021-08-26 09:18:13 -07:00
Dustin Carlino
d2afeb05ef Organize the 3 modes a bit more explicitly.
Still need to share the logo / map switcher
2021-08-26 09:07:45 -07:00
Michael Kirk
f7703c0a43 label perf: other cleanup 2021-08-26 08:25:16 -07:00
Michael Kirk
9b527f1904 label perf: cheaper sloppier collision check 2021-08-26 08:25:16 -07:00
Dustin Carlino
0ad93819f7 Strip out some not-yet-ready stuff from the ungap tool:
- share proposal
- magnifying glass
- the "miles of new bike lanes" emphasis

and add:

- contents in the "about" popup
- address/business search
2021-08-26 08:20:41 -07:00
Dustin Carlino
b14d2d2bbf Rebrand the tool, create new launch scripts for the binary release,
clippy.

[rebuild] [release]
(I'm not done just yet, but want to check the launch scripts)
2021-08-25 16:52:43 -07:00
Dustin Carlino
93fb9a274f
Organize bike lane buffer types into a dropdown (#724)
Organize lane types in the editor. All buffer types expressed as a dropdown, and lanes for moving/not moving are grouped.
2021-08-25 14:12:17 -07:00
Dustin Carlino
59f9c443d5 We need to recalculate the road editor fog of war upon edits, since the road width may change 2021-08-25 13:36:05 -07:00
Dustin Carlino
0b8e4d07dd
Road lane width card (#736)
* Show lane width in each lane card

* Stretch lane cards based on lane width, too

* lane sizing: adjust padding only - keep icon size (#738)

* road editor design tweaks (#737)

- regroup sections to avoid undesirable inner rounding
- move panel away from edge
- make tabs more obvious with "shadow" on bottom of unselected tabs

* Recalculate pathfinding before starting the route tool, since we lazily avoid doing that in the other ungap edit modes. This may become unnecessary when the route tool always does Dijkstra's with custom routing params, but we're not there yet, so it crashes currently

* Show lane width in each lane card

* Stretch lane cards based on lane width, too

* lane sizing: adjust padding only - keep icon size

previously when scaling the icons to fit, the size of the cards was
a little less obvious - plus the icons could become illegible.

Co-authored-by: Dustin Carlino <dabreegster@gmail.com>

Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>
2021-08-25 13:35:07 -07:00
Dustin Carlino
25b5ac2037 Recalculate pathfinding before starting the route tool, since we lazily avoid doing that in the other ungap edit modes. This may become unnecessary when the route tool always does Dijkstra's with custom routing params, but we're not there yet, so it crashes currently 2021-08-25 12:31:47 -07:00
Michael Kirk
ae80eb2509
road editor design tweaks (#737)
- regroup sections to avoid undesirable inner rounding
- move panel away from edge
- make tabs more obvious with "shadow" on bottom of unselected tabs
2021-08-25 12:21:05 -07:00
Dustin Carlino
9761373c4b Don't recalculate map hover state in the middle of dragging 2021-08-25 11:47:10 -07:00
Dustin Carlino
718725c671 Fix #731, weird lane swap 2021-08-25 11:26:48 -07:00
Dustin Carlino
c298124dcc
Ditch the outline showing the current road being edited. Instead, focus a cone of light on the road and add fog-of-war to the rest of the map. (#735) 2021-08-25 11:19:49 -07:00
Dustin Carlino
dd27098ca8
Recalculate the hovered lane in the road editor very carefully. Any time (#734)
* Recalculate the hovered lane in the road editor very carefully. Any time
the map is edited, lane IDs change. There were many possible crashes
before.

* Don't deselect lane when clicking in screen-space
2021-08-25 11:16:16 -07:00
Dustin Carlino
f64cd89f26 When no lane is selected, the hotkeys add a new lane. When a lane is selected, those hotkeys modify the current lane. (It's very disorienting to click a lane, hit 'b', and see a new bike lane instead of the modified one. 2021-08-25 10:51:57 -07:00
Dustin Carlino
2443479ad2 Flatten the lane width controls into a single row, now that there's more room 2021-08-25 10:15:51 -07:00
Michael Kirk
f211713235 road editor style changes
1. "drill down" - so attributes applying to the entire road are up top,
   while attributes applying to only a single lane are below.

2. use "tab" metaphor to treat each lane as a tab, showing the lane
   attributes beneath the "active" lane-tab.
2021-08-25 09:58:06 -07:00
Michael Kirk
fc901c3d2f sections should have padding 2021-08-25 09:36:16 -07:00
Michael Kirk
f15a40efd9 Uniform heights for legend items 2021-08-25 09:33:51 -07:00
Dustin Carlino
6c3ce23e5f Use a cross-hatch pattern to show edited roads, instead of that bizarre
cyan.

For the moment, just to simplify things, bake the edited color into the
bike network layer. Probably will split it out later, maybe moving the
proposal management to the legend row.
2021-08-24 15:50:19 -07:00
Dustin Carlino
78222ffadb Preserve the same Layers object through all the states of the ungap tool. Do this by a "new" Transition that's allowed to consume the current state.
Alternatives considered:
- put Layers in the App struct, since it's shared -- but only for the
  ungap tool. It'd be nice to split it into its own standalone crate now,
  but it'll be some work to refactor edit mode out of game.
- put Layers in App session
2021-08-24 14:37:16 -07:00
Dustin Carlino
f5c47d6c8f Make the layers panel only show bike network legend when enabled.
(Steep streets legend still gets lost sometimes)
2021-08-24 13:45:49 -07:00
Dustin Carlino
640489459a Splitting out code for managing the bottom-right panel with all of the layers.
Then we can include it in the quick sketch and route planner tools.
2021-08-24 13:22:58 -07:00
Dustin Carlino
06b74dbe55 Refactor the steep streets layer, add it as an option to the ungap tool.
Code and usability issues accumulating as more things cram into this
view... tackling that next.
2021-08-24 11:52:16 -07:00
Dustin Carlino
bddbe8af99 Followup to #728: highlight lanes on map when hovering on the cards 2021-08-24 10:58:04 -07:00
Dustin Carlino
b5015143cb Small drag-and-drop typo fixes 2021-08-24 10:27:43 -07:00
Michael Kirk
4e93b34ded restore proper shape/size/color/highlights of lane cards 2021-08-24 10:27:43 -07:00
Dustin Carlino
b9b0ac5bb7 Very roughly express the road editor lane cards with DragDrop 2021-08-24 10:27:43 -07:00
Dustin Carlino
d4e19a990e Better default placement of new routing waypoints 2021-08-23 19:21:41 -07:00
Dustin Carlino
b2f30fa192 Add some more metrics for a route, related to safety 2021-08-23 19:02:44 -07:00
Dustin Carlino
7e3802a519 Add elevation details to routing results 2021-08-23 18:02:29 -07:00
Dustin Carlino
a05a4f534c Plug in the routing, with a basic results info panel 2021-08-23 16:44:49 -07:00
Dustin Carlino
8f485667fd Start a new UI for routing. Just managing waypoints 2021-08-23 13:44:21 -07:00
Dustin Carlino
fbd173408e Import new Seattle OSM data with a bunch of fixes around Aurora, and actually disable parking in the Aurora maps
Remove Queen Anne from prebaking -- it trips some crash with waking up
following vehicles that I'm not going to dig into right now.
2021-08-22 19:50:47 -07:00
Dustin Carlino
996a3f30b3 Enable hotkeys for adding a new lane to a road. I don't remember why we weren't doing this before; it's really useful. 2021-08-21 19:23:19 -07:00
Dustin Carlino
790bdc2ef9 Show change to total road width, with disclaimers 2021-08-21 16:57:56 -07:00
Dustin Carlino
047ced16be Improve heuristics for adding buffers to a bike lane 2021-08-21 16:24:26 -07:00
Dustin Carlino
b276178b4b Refactor add_new_lane heuristics, hopefully without changing behavior... 2021-08-21 15:38:54 -07:00
Dustin Carlino
f8a209724c Add some tests for adding a new lane to a road, in preparation to refactor / improve the heuristics. Closes #635 2021-08-21 15:32:14 -07:00
Dustin Carlino
7f9205598a Just split out road editing heuristics, to keep the main module focused on the UI 2021-08-21 15:22:32 -07:00
Dustin Carlino
816e125cbe Refactor some stuff related to unit tests for a road's lanes. #635 2021-08-21 15:17:57 -07:00
Dustin Carlino
657185c035 Fix a road editor crash:
1) click a lane
2) press left/right arrow key to move it
3) don't move the mouse! click

The current selection was never refreshed, but the lane IDs change
2021-08-21 10:44:23 -07:00
Dustin Carlino
ed7cf8515f Make it more obvious the route can be dragged 2021-08-20 15:39:43 -07:00
Dustin Carlino
c08645011d The street name rewriting case I was afraid of has ALREADY turned up,
because of course it has

(and fix rebase)
2021-08-20 15:18:54 -07:00
Dustin Carlino
4ad652fce5 Use SVG to create a text outline for labels 2021-08-20 15:14:41 -07:00
Dustin Carlino
e302100a9a Space out labels more aggressively: no overlapping 2021-08-20 15:14:41 -07:00
Dustin Carlino
28b9702032 Scale text at low zoom 2021-08-20 15:14:41 -07:00