Commit Graph

1619 Commits

Author SHA1 Message Date
Dustin Carlino
e77ce12537 Draw custom LTN boundaries, by painting blocks. #794
Still need to think through the UX of how to manage custom boundaries
and incorporate them in the "browse neighborhoods" screen.
2021-12-14 10:33:42 -08:00
Dustin Carlino
3d4900f984 Seemingly fix all "bowtie" intersections, where the polygon looped back
on itself impossibly. Achieve this by sorting polylines around a center
more carefully.

Regenerating all maps...
2021-12-11 07:58:49 -08:00
Dustin Carlino
b45bf869b7 Populating the map_model transit representation from the raw GTFS data. #372 2021-12-07 03:10:38 -08:00
Dustin Carlino
fc674df9ac Cleaning up the map_model transit representation a bit. #372 2021-12-07 03:10:38 -08:00
Dustin Carlino
6e11c386ac Mechanical refactor: bus {stop, route} -> transit. #372
(Mostly renaming map_model code everywhere, not yet sim layer and above)
2021-12-07 03:10:38 -08:00
Dustin Carlino
98e0a56120 Extract some GTFS data and put it in RawMap. #372 2021-12-07 03:10:38 -08:00
Dustin Carlino
815ae47e02 Model diagonal LTN filters. #794 [rebuild] [release]
Only supported at 4-way intersections currently.
2021-11-21 12:55:50 -08:00
Dustin Carlino
8e7d54f135 Add some explanation to the LTN route tool 2021-11-21 11:54:29 -08:00
Andrew Wei
65f187f250
Adding main road penalty to ltn (#810) 2021-11-20 15:28:59 -08:00
Dustin Carlino
244e965427 When we can't detect which roads a crosswalk covers, assume there's no
marked crossing most of the time. #795
2021-11-18 13:31:30 -08:00
Dustin Carlino
c13ca2d20b
Rip out all old broken code for importing OSM bus stops and routes. #372 (#808)
This code stopped working around July 2020 when I attempted to tackle #190. It's sat dormant since then, with most bus and light rail routes not imported correctly at all. I'm going to (eventually) start another attempt at public transit in A/B Street by treating GTFS as the main source of truth, not trying to understand route relations mapped in OSM. It's simplest to just rip out all this old code first. Some of it may be useful later, but version control preserves it.

Regenerating everything; this is a binary format change.
2021-11-17 18:51:59 -08:00
Dustin Carlino
68d9616875
Use simple Rust code to specify map importing config, instead of conf… (#807) 2021-11-17 15:52:09 -08:00
Marcel Dejean
641c908051
No right on red (#806)
* add turn_on_red config option which is false for nyc

* when making stages, don't add movements that don't share a stage with a protected movement

* Fix a renamed DirectedRoadID field from
cb3693bd7a and the new turn_on_red field
in the test crate

* Update all map config files with the new option

for x in importer/config/*/*/cfg.json; do
	cat $x | jq '.map_config += {turn_on_red: true}' > tmp
	mv -f tmp $x
done

(And then undoing NYC)

* turn on red banned on all non-us maps

* regenerate all maps

Co-authored-by: Marcel Dejean <marcel@dejean.nyc>
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2021-11-16 23:06:11 -08:00
Dustin Carlino
3a1e5a66cb Start modeling unmarked pedestrian crossings. #795
- Use the new filter_crosswalks option to downgrade zebra crossings into
  unmarked
- Add a routing penalty
- Render differently than zebras
- They otherwise act the same as marked crosswalks

Simulation behavior (like pedestrians not having priority over vehicles)
not yet implemented. No change to any existing maps, since
filter_crosswalks isn't enabled anywhere.
2021-11-12 13:38:33 -08:00
Dustin Carlino
4b17e4a676 Refactor some code in the lagging green traffic signal module 2021-11-12 11:46:01 -08:00
Dustin Carlino
08223efed5 Whoops, forgot to not leak all the RAMs 2021-11-11 14:10:42 -08:00
Dustin Carlino
006839aec2 Make the LTN router actually avoid modal filters.
Accomplishing this through RoutingParams, rather than actually editing
the map. I don't want to commit to a map model representation of modal
filters and actually edit the map until we think through diagonal
filters. This effectively revives pathfind_avoiding_roads from the old
congestion capping experiment, but organized better.
2021-11-11 14:03:11 -08:00
Dustin Carlino
cb3693bd7a Refactor: DirectedRoadID.road, not .id 2021-11-09 10:48:39 -08:00
Dustin Carlino
3903f3b564 Refactor vehicle_cost to include zone_cost, like the docs say it does 2021-11-09 10:34:50 -08:00
Dustin Carlino
fd10ea74dc Add configuration to filter the auto-generaed crosswalks to only exist
near OSM highway=crossing nodes. #795

Not enabled anywhere, because it doesn't seem to produce good results.
Possibly footway=crossing ways need to be used for this as well.

Had to regenerate all maps, since the binary format changes.
2021-11-08 20:08:49 -08:00
Dustin Carlino
98d1f2cd9f Prototype rat-run detection again. Not working yet, so leaving disabled. #794 2021-11-07 12:02:16 -08:00
Dustin Carlino
2c08d62318 Track interior roads as we merge perimeters. It's much easier to retain this as we build it up, instead of later figuring out which side of a perimeter is the inside or outside. 2021-11-03 13:38:38 -07:00
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