Commit Graph

1597 Commits

Author SHA1 Message Date
Dustin Carlino
eeedf098d3 Handle the case of block merging when the entirety of one block overlaps
with the other
2021-11-02 16:54:46 -07:00
Dustin Carlino
f4e0b4b1e3 Log warnings to explain why merging blocks fails 2021-11-02 13:42:25 -07:00
Dustin Carlino
2917361417 More aggressive block merging 2021-11-01 17:09:50 -07:00
Dustin Carlino
cfec9a2049 Avoid block merge crashes! But some neighborhoods don't get fully
merged.

Also make all the blockfinding algorithms deterministic, for easier
debugging.
2021-11-01 16:56:42 -07:00
Dustin Carlino
108f6a6fc2 Refactor blockfinding APIs to prep for actually merging everything in a
single neighborhood.
2021-11-01 15:49:56 -07:00
Dustin Carlino
a996b891ab Improve the algorithm for merging adjacent blocks. It now handles
internal dead-ends and blocks that share a sequence of common roads.

Still not robust enough, but huge step forwards.
2021-11-01 14:37:49 -07:00
Dustin Carlino
1eb7ec7ddf Detect perimeters hitting map boundaries upfront. This lets us more
easily work with perimeters and only transform to blocks when we need to
last minute. As a happy side effect, it vastly speeds up blockfinding --
the slowdown was attempting to mangle geometry for the huge broken
perimeters near boundaries!

Also improve the incremental merge debug UI
2021-10-29 16:43:35 -07:00
Dustin Carlino
32fc46831b Draw arrows to show entrances/exits to a LTN.
(and rename Line::reverse for consistency with PolyLine)
2021-10-29 12:25:30 -07:00
Dustin Carlino
e62a41d45b Color adjacent blocks differently 2021-10-28 15:10:50 -07:00
Dustin Carlino
a2d7beb508 Make block outlines trace around dead-ends 2021-10-28 14:22:07 -07:00
Dustin Carlino
ef6942f83e Improvements to block geometry:
- always use proper road edge
- trace along the boundary of intersection polygons
2021-10-28 12:45:27 -07:00
Dustin Carlino
5e5e411de8
Detect neighborhoods with the new block abstraction (#793) 2021-10-28 10:11:57 -07:00
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
007cf0b28d Split the importer into individual commands with structopt. #745 2021-10-25 13:02:00 -07:00
Dustin Carlino
98b350418d Log warnings when stripping out broken commands from edits 2021-10-24 12:56:02 -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
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
66c908913e Run the area polygons in city.bin through the georust simplification.
Seattle drops from 3MB to 800KB with no discernable loss of quality.
2021-10-14 10:37:32 -07:00
Dustin Carlino
77bc0423ac Critical bug in the final hour: Aurora wasn't marked as high-stress, because the road rank was just looking for arterials, not also highways! 2021-10-12 11:46:23 -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
Dustin Carlino
755e723251 Get some different boundaries set up in Seattle, to support the bike
network tool reasonably on the web. #743, #746

I'm declaring the budget to be 20MB gzipped map files.

- north and south seattle boundaries extended a bit
- central seattle added
- stripping out unused pathfinding data for walking and transit to
  squeeze down the size. avoiding crashes for empty pathfinding -- if
  you try to simulate a minified map, most trips will just fail
2021-10-11 14:06:49 -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
9803558885 Dramatically speed up editing roads by re-snapping buildings and parking
lots in one big batch, instead of after every single command.

A batch of 300 edited road segments in huge_seattle went from over 70
seconds to apply down to... 0.6 seconds. Embarrassing.
2021-10-05 12:17:39 -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
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
c4d38ca591 A humble start to showing an alternate, low-stress route. #743 2021-09-27 13:13:11 -07:00
Dustin Carlino
d365213948 Small refactor: {road, lane}.length() 2021-09-26 11:08:44 -07:00
Dustin Carlino
0e869b35c0 Detect some rat runs 2021-09-24 15:28:43 -07:00
easbar
0a7670d874 Update fast_paths to current master, faster preparation 2021-09-13 10:53:14 -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
add42b6f19 When pathfinding with custom routing params (from the debug UI), only rebuild the one graph we need. #746 2021-09-05 17:04:54 -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
0ad76921fd Don't crash in map_editor when we encounter overlapping OSM ways; skip that intersection and print loudly. 2021-09-04 10:43:14 -07:00
Dustin Carlino
01877cb576 Remove the experimental sumo import crate from early this year. It causes very slight technical debt (some public Map stuff) and there are no plans to do anything with this. The Sumo XML parser is always here in version control if it becomes interesting again later. 2021-09-01 19:23:13 -07:00
Dustin Carlino
b8d0fd6499 We just need the bike graph. #746 2021-09-01 19:15:07 -07:00
Dustin Carlino
f83168184d Start a tool to compress Map files by removing information unnecessary to the bike network tool. #746
Just a modest start, switching from CHs to Dijkstra's for pathfinding. Not uploading the minified result yet.
2021-09-01 19:02:42 -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
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
1c9aaac17f Show drop position on the map while dragging lane cards 2021-08-29 16:40:54 -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
b2f30fa192 Add some more metrics for a route, related to safety 2021-08-23 19:02:44 -07:00