Commit Graph

2907 Commits

Author SHA1 Message Date
Dustin Carlino
c3b74d1358 Stop using red as a cell color; it really shouts 'problem' 2022-01-11 10:02:48 +00:00
Dustin Carlino
b28093f2a8 Draw all filters in the browse neighborhood screen 2022-01-11 09:58:23 +00:00
Dustin Carlino
afc9846c1c Try a brute-force search for the best single filter placement. Also not
great.
2022-01-11 09:40:54 +00:00
Dustin Carlino
65899f3a79 First tentative experiments in automatic filter placement -- the greedy
approach
2022-01-11 08:40:56 +00:00
Dustin Carlino
8ff4c41ea1 Some useful debugging / correctness steps towards more robust blockfinding. [rebuild] [release]
I have another branch that handles roads without sidewalks on one side
-- it helps in some cases, but regresses in others, so not merging it
yet. But taking a smaller step and bringing in some stricter common
endpoint logic from there.

Bringing in some useful intermediate changes
2022-01-09 11:07:10 +00:00
Dustin Carlino
e1d88f10ad Detect bad intersection polygons 2022-01-06 11:08:22 +00:00
Dustin Carlino
2356cee1db When tracing perimeters, allow doubling back at a dead-end with exactly
1 lane (usually a cycleway or footway). This correctly produces a few
more blocks in some maps -- as the goldenfile diff (and manual
verificaton) shows!

Also allow jumping from LTN browse to debug mode, to conveniently work
on blockfinding problems.
2022-01-06 10:16:11 +00:00
Dustin Carlino
045b82be4e Don't crash when no rat runs exist 2022-01-03 09:36:34 +00:00
Dustin Carlino
8d0b891406 Prevent neighborhood_containing from crashing in North Leeds. [rebuild] [release] 2022-01-02 17:48:25 +00:00
Dustin Carlino
803f387428 Only allow adding/removing blocks adjacent to the current neighborhood's perimeter. This will make it much easier to incrementally transfer ownership of each block to different neighborhoods, and it also helps prevent the user from creating some invalid results. The UX of trying to do something invalid is a little clunky, but it's usable. [rebuild] [release] 2022-01-02 17:35:40 +00:00
Dustin Carlino
af08ff4e74 Show the (original) partitioning by color in the boundary selection UI 2022-01-02 09:50:06 +00:00
Dustin Carlino
f6274e868f Make the LTN browse state operate off a per-session partitioning 2022-01-02 09:13:33 +00:00
Dustin Carlino
8aa58000ed Slightly improve LTN adjust boundary screen:
- better instructions
- can just tap the add/remove keys, in addition to holding and painting
2022-01-01 18:30:25 +00:00
Dustin Carlino
7d6f133f1c Make the LTN tool handle roads that already ban cars.
- Don't allow filtering them
- Don't cross them when calculating cell connectivity
- Create special green cells for them, and don't count towards the
  disconnected warning
2021-12-31 16:28:51 +00:00
Dustin Carlino
332e88f235 Don't color adjacent LTN cells the same; it's that sort of combination
of misleading and preventable so as to merit a fix
2021-12-31 15:21:52 +00:00
Dustin Carlino
b8f4550824 Draw filtered streets with two colors when there's a filter on them.
This actually revealed that find_cells was a bit wrong -- when a filter
is in the middle of a cell, one half of it wasn't assigned anywhere
2021-12-31 11:53:47 +00:00
Dustin Carlino
bffa469396 Print LTN pathfinding info in the panel, not a tooltip. The tooltips
clash with clicking on roads to filter them, and probably weren't
terribly discoverable anyway.
2021-12-29 18:23:33 +00:00
Dustin Carlino
6219c7f584 Fix crash in LTN pathfinding when deleting waypoints 2021-12-29 17:38:38 +00:00
Dustin Carlino
f7f23465c1 Edit modal filters from within the pathfinding view too.
Slow implementation, but at least it works
2021-12-29 13:14:44 +00:00
Dustin Carlino
fbc847f48c Share modal filter management between connectivity and rat run states 2021-12-29 12:38:11 +00:00
Dustin Carlino
1e414d0f31 Share the panel style too for pathfinding. (It was a bigger change, easier to separate) 2021-12-29 11:54:12 +00:00
Dustin Carlino
4264682be8 Share a panel style for 2/3 of the per-neighborhood states 2021-12-29 11:46:29 +00:00
Dustin Carlino
ecd69e48a9 Refine the rat run algorithm: don't look for paths between different cells. That forces weird U-turns, using cul-de-sacs, using the perimeter road, etc 2021-12-29 10:28:53 +00:00
Dustin Carlino
451a4f1a5d Warn when a cell is totally cut off with too many filters 2021-12-29 10:11:25 +00:00
Dustin Carlino
352b97828a Track where cells touch the neighborhood boundary 2021-12-29 10:01:39 +00:00
Marcel Dejean
cfe248fdab Include contraflow turns in get_turns_for, get_turns_from_lane,
Change get_next_turns_and_lanes (unused) to not take intersection, then fix uses of get_turns_from for sidewalks to use it

Add get_next_turns_and_lanes_for and use for floodfill
2021-12-20 23:11:36 +00:00
Marcel Dejean
65f086ecb3 PathStep::ContraflowTurn to allow walking turns both ways
* Also implement ContraflowMovement for pathfinder v2
* Change uses of Turn to Turn | ContraflowTurn
* Reverse contraflowturn geometry when tracing pathstep
* Don't start or end a path in a ContraflowTurn either
2021-12-20 23:11:36 +00:00
Dustin Carlino
fd852795c2 Make the rat-run detector respect modal filters.
Overall results still not right, but getting closer. Some "rat-runs"
retained will only be in the neighborhood out of "necessity" -- they
should maybe be totally filtered out for the heatmap counts.
2021-12-19 12:27:33 +00:00
Dustin Carlino
83bf6953d1 Rank each street inside a neighborhood as quiet/busy, based on the number of rat-runs through it.
Show this through a heatmap and tooltips
2021-12-19 12:06:42 +00:00
Dustin Carlino
5542632d61 Take a third stab at finding rat runs in a neighborhood. This new
definition finds all entrances and exits to a neighborhood, grouped by
the name of the perimeter road they connect to. Then the shortest
driving path between every pair is found, and the results are sorted to
emphasize paths that spend most of the time inside the neighborhood.

This new version doesn't crash and seems to produce reasonable results
everywhere I've looked.

It doesn't yet pay attention to the modal filters people have created,
or summarize which roads are likely to be quiet or not.
2021-12-19 11:24:11 +00:00
Dustin Carlino
904ba3c249 Don't even allow selecting intersections that aren't 4-way, since no diagonal filters can be manipulated there. 2021-12-19 10:28:50 +00:00
Dustin Carlino
f0a1110d04 Draw planters when zoomed in. Icon by Trang 2021-12-17 13:31:49 +00:00
Dustin Carlino
eb4060b071 Improve LTN tool rendering when zoomed in. Outlines around selected
objects are less thick and opaque, to cover up less of the road.
2021-12-17 11:37:54 +00:00
Dustin Carlino
4e79d19765 Revert "When calculating LTN cells, don't cross bike-only roads."
This reverts commit 02420f920e.

Did not mean to push this yet, sorry!
2021-12-16 14:02:41 +00:00
Dustin Carlino
02420f920e When calculating LTN cells, don't cross bike-only roads. 2021-12-16 14:02:21 +00:00
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
611ca97a28 Conveniently jump from the main apps to the RawMap editor, to debug geometry more fluidly 2021-12-11 11:24:37 +00:00
Dustin Carlino
ec9ed9c64c Import a small slice of Kennington with a very representative set of London-specific map model issues. Add it to the screenshot tests, replacing Great Kneighton as the GB test. And trim out lakeslice from the test; we don't need quite so much redundancy for Seattle. 2021-12-09 14:31:20 +00:00
Dustin Carlino
56a42f9f21 Fix crash in ungap's route sketcher. If you drag intermediate waypoints
such that the path is impossible, don't move the waypoint.
2021-12-07 15:25:46 +00: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
7eba7a10cf Update map URL in the LTN tool. #766
It's increasingly lucrative to try refactoring this.
2021-12-05 14:13:57 +00:00
Dustin Carlino
8318bbf5d2 Fix clippy warnings. [rebuild] [release] 2021-12-05 12:29:35 +00: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
Dustin Carlino
41dfabe28f Clean up from past few days:
- upload the GTFS files now being imported
- disable the half-started area-based traffic spawner
2021-11-21 10:58:00 -08:00
Andrew Wei
65f187f250
Adding main road penalty to ltn (#810) 2021-11-20 15:28:59 -08:00
Dustin Carlino
3d228861b2 Prototype a tool to spawn traffic between two areas. One intended use is
to manually sketch traffic patterns that try to cut through LTNs.

Just get the UI selection stuff going for now
2021-11-20 12:26:42 -08:00
Dustin Carlino
42e6efd962 Place modal filters where you click on a road, not arbitrarily in the middle. (Written with Andrew pair programming during Hack to Give Thanks) 2021-11-20 11:18:38 -08:00
Dustin Carlino
27894c02cb Road labels don't need to be shown zoomed-in for LTN 2021-11-17 08:00:58 -08:00