Commit Graph

7409 Commits

Author SHA1 Message Date
Dustin Carlino
c18cc762bb Finally make the select boundary UI properly update the partitioning as
we make changes! So far, just handling "stealing" a block from another
neighborhood. The other neighborhood can wind up being totally deleted.
2022-01-15 16:57:59 +00:00
Dustin Carlino
6376a74c7a Initially draw the red outline in the LTN select boundary mode 2022-01-15 15:58:45 +00:00
Dustin Carlino
b5e540d588 Fix state management in the LTN tool. Previously, changing maps, then going back to home screen from browse was broken 2022-01-15 15:42:01 +00:00
Dustin Carlino
f82ee8e1fa Show how many streets in a neighborhood allow through-traffic 2022-01-15 15:32:17 +00:00
Dustin Carlino
ca3cbaa0ad new rust 2022-01-15 14:58:29 +00:00
Dustin Carlino
2a154bd679 Avoid crashign when drawing cells. Bridges and tunnels can leak out of
boundary polygons.
2022-01-14 17:03:19 +00:00
Dustin Carlino
3cf846f870 Include LTN cells in the geojson export. Very slow, but working,
implementation
2022-01-13 17:52:56 +00:00
Dustin Carlino
509217b024 Start a simple GeoJSON export for LTNs. Cells are missing. 2022-01-13 15:37:47 +00:00
Dustin Carlino
412e0d585d Refactor cells -> grid, in preparation to generate cell outlines 2022-01-13 12:56:51 +00:00
Dustin Carlino
c6ec390d0e Pass around NeighborhoodID when switching between states. This
1) will support modifying boundaries and not getting state out-of-sync
2) vastly simplifies switching tabs
2022-01-12 14:55:56 +00:00
Dustin Carlino
cb501933fd Implement LTN undo/redo... and actually just handle undo, for
simplicity, and because repeating an undid (??) action is easy
2022-01-12 14:34:10 +00:00
Dustin Carlino
e0b18d6d07 Organize modal filter code before big changes 2022-01-12 13:55:50 +00:00
Dustin Carlino
6826145de2 Stub out a UI for undo/redo in LTN
(Rebuilding panels at the right time is the bulk of the change here)
2022-01-12 13:47:49 +00:00
Dustin Carlino
7d4a377173 Draw cell borders in different styles -- kind of necessary with the only-one-border schemes. 2022-01-12 13:07:35 +00:00
Dustin Carlino
c6787f0a80 Fix an edge case in the only-one-border LTN heuristic 2022-01-12 12:33:55 +00:00
Dustin Carlino
c024a484e3 Fix too-quick push on last commit, and restore the draw streets toggle broken a few commits ago 2022-01-12 12:25:36 +00:00
Dustin Carlino
30fc96bdd0 An automatic LTN heuristic that closes all but one border 2022-01-12 12:23:20 +00:00
Dustin Carlino
8e26fd2fb5 Import Hackney 2022-01-11 15:52:47 +00:00
Dustin Carlino
d3ff9d3412 Fix c08484505e, which broke listing files
in a directory! This impacted loading newly imported maps and finding
Seattle/UK scenario files.
2022-01-11 15:33:11 +00:00
Dustin Carlino
47930e714f Emphasize boundary roads in the browse neighborhood view 2022-01-11 10:35:59 +00:00
Dustin Carlino
5f3bb8897d Draw disconnected cells as red, to shout 'problem' 2022-01-11 10:05:16 +00:00
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
27452f0e08 new release 2022-01-09 20:47:43 +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
e1d0604718 Reduce the number of points along curvy roads. When they're tagged in OSM too close together, it explodes PolyLine shifting. #833 2022-01-06 17:27:10 +00:00
Dustin Carlino
85709b1e4f Workaround #834, which was causing partitioning to infinite loop when
there are disconnected railway segments dangling around
2022-01-06 13:25:16 +00:00
Dustin Carlino
cb3138dbfe When turning a perimeter into a block polygon, don't insist on tracing
along the perimeter of broken intersections.

There are cases where intersection geometry is a little bit broken,
jutting out a bit and touching a road. It's more robust to still produce
a reasonably shaped block in these cases, instead of totally give up.

Visual inspection and the goldenfile VASTLY improved!
2022-01-06 11:22:06 +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
5caccf6aab Add a goldenfile test to track how well we find single blocks and merge them into LTN areas. 2022-01-06 10:06:16 +00:00
Dustin Carlino
c08484505e Ignore hidden files like .DS_Store, fixing #832 2022-01-05 12:47:28 +00:00
Dustin Carlino
c59bc370fe Grab new Bristol data with some more geometry fixes. Trying to get blockfinding to work here everywhere 2022-01-04 18:07:29 +00:00
Dustin Carlino
2e7437043d Grab new Bristol data with https://www.openstreetmap.org/changeset/115765021 to fix a broken curve 2022-01-04 17:49:57 +00:00
Dustin Carlino
e863517f13 Adjust Bristol boundary 2022-01-04 11:00:11 +00:00
Dustin Carlino
b08a259059 Import part of east Bristol for LTN work 2022-01-04 10:22:56 +00:00
Dustin Carlino
045b82be4e Don't crash when no rat runs exist 2022-01-03 09:36:34 +00:00
Dustin Carlino
630dc17d2d new release 2022-01-02 18:43:57 +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