Commit Graph

245 Commits

Author SHA1 Message Date
luz paz
7b63227407 Fix typos
Found via `codespell -q 3 -L crate,flor,nd,noice`
2022-07-16 08:55:39 +01:00
Dustin Carlino
373595f250 Fix two cases where u-turns weren't created. #947
Also has the happy side effect of preventing modal filters from being
put on roads that lead to no-car roads (which're effectively dead-ends
for cars).

Regenerate everything
2022-06-25 08:54:56 -05:00
Dustin Carlino
ad06d145d4 Regenerate everything after all the geom changes. Also likely picking up minor diffs from using new georust 2022-06-20 23:17:19 +01:00
Dustin Carlino
360870a72c Refactor convert_osm::Options default settings 2022-06-12 16:35:11 +01:00
Wuping Xin
5d1038d57b
Minor typo fix tests/main.rs (#932) 2022-06-02 19:48:57 +01:00
Dustin Carlino
d98f18bb18 Create a more careful API for handling one-way roads everywhere, in
preparation for modifying them in the LTN tool.

Regenerated everything. This had some effects on overlapping road
shrinking, mostly positive. Screenshot diffs all changed, since I
switched laptops again.
2022-05-27 17:01:36 +01:00
Dustin Carlino
8f49dddaee Import roads that happen to have trams on them, for Geneva. This was previously breaking in Berlin, but now we can skip over ways with overlapping geometry.
First time regenerating everything on another laptop; there may be some
weird changes unrelated to stuff here (like montlake prebaked data?),
but nothing that seems problematic
2022-05-23 15:42:55 +01:00
Dustin Carlino
5e11e6254b Force Bristol study area to match an LTN project. #916 2022-05-18 12:13:56 +01:00
Dustin Carlino
a56f47bfaf Change how non-driveable roads (cycleways) work in the LTN tool and
blockfinding. Stop using them as parts of block boundaries, and stop
drawing special "car-free" cells around them.

Motivation in the PR description.
2022-05-17 10:57:27 +01:00
Dustin Carlino
867be8fa07 Reimport SMP, with fixed sidewalk data for one-ways in OSM.
There were 3 manual steps here:

1) Tag sidewalk=left,right,both along many one-way streets in OSM where
   the inferred value was very wrong, and causing a large difference
   from smp_sidewalk_widening
2) Clear out smp_sidewalk_basemap, broken by OSM ID changes. This has
   never actually (and still does not) contain real baseline sidewalk
   widths, but still might eventually.
3) Manually update smp_sidewalk_widening, broken by OSM ID changes.

The simulation results with the proposed edits now don't cause as many
spurious route changes.
2022-05-15 10:03:23 +01:00
Dustin Carlino
1bf5bb2d8b Trim down SMP scenario size by actually deleting cancelled trips. Also makes the results less confusing. 2022-05-06 12:55:14 +01:00
Dustin Carlino
15111dcf9d Recalculate prebaked data for Seattle. I'm seeing a crash in the Arboretum and a diff in Montlake since the last update in 3d738e93e8. Not sure how things got out of sync -- possibly the S3 bug just synced. 2022-05-06 12:46:16 +01:00
Dustin Carlino
3d738e93e8 Update Seattle OSM data.
The main reason is to unblock osm2lanes cutover by avoiding
https://github.com/a-b-street/osm2lanes/issues/153. A secondary reason
is to pull in fixes in SLU for #818.

But of course grabbing fresh data wasn't straightforward:

- Need to collapse small junction=circular ways just like roundabouts,
  or else Montlake starts gridlocking. And so actually, regenerating all
  maps, in case any happen to use this.
- Had to update a bunch of proposals since OSM IDs changed. I just used
  the automatic repairs with some edits filtered out. Fixing edits
  really is quite tedious when IDs change; we need something more
  robust. (Just give up, describe geometry, and always snap to the best
  match?)
- Had to update the one baked-in traffic signal for similar OSM ID
  reasons, with similar hassle.
2022-05-02 11:04:49 +01:00
Dustin Carlino
304a28306f Change the bus route goldenfile test to Aricanduva, after changing GTFS import to only happen there 2022-05-01 19:54:45 +01:00
Dustin Carlino
f72dd62e56 Store lane_specs_ltr on RawRoad, instead of constantly recalculating. https://github.com/a-b-street/osm2streets/issues/2 2022-05-01 19:39:57 +01:00
Dustin Carlino
738f50f5b8 Prevent pedestrians from endlessly cutting off cars at a stop sign by
limiting how long a crowd can enter a crosswalk. #517

Removing Tehran from prebaking; it starts gridlocking. I didn't
investigate why; making SMP realistic unfortunately takes priority right
now.
2022-05-01 17:02:14 +01:00
Dustin Carlino
2d547a383f Stop importing GTFS data for all of Sao Paulo -- only Aricanduva. Edits near the sidewalk of a bus stop still crash (as expected). Avoid this (and likely confusing simulation effects) in SMP. 2022-04-30 14:12:25 +01:00
Dustin Carlino
79126f28df Remove elevation data from Sao Miguel Paulista. The SRTM part of elevation_lookups hasn't had validation, and I'm seeing pedestrians slow down on steep streets that may not actually be steep. Let's just flatten that map out to remove a possible complication. 2022-04-28 13:19:13 +01:00
Dustin Carlino
bd5d93ba84 Wire up a way to override OSM sidewalk widths in basemaps using proposals.
We need this because we have a data source for SMP that we can use with
extra attribution, but not upload to OSM.

This whole commit is gross hacks; going forward, we need a proper
process for upstreaming stuff in OSM.
2022-04-27 10:21:54 +01:00
Dustin Carlino
651a1f571a Slow down pedestrians when they're on a crowded sidewalk. #859 2022-04-23 21:18:26 +01:00
Dustin Carlino
9b4abae174 Fix a treachurous bug that was crashing the simulation, first uncovered
by chance in #870.

A vehicle exits a driveway and blocks a lane on its way out. When we try
to clear the static blockage, the queue calculation recurses to resolve
distances on the queue where that vehicle is entering. But since we
temporarily don't have the car in the list of cars (for the borrow
checker), it was crashing.

One of those "2 hours to figure out, 30 seconds to fix" bugs.
2022-04-23 20:03:28 +01:00
Dustin Carlino
8a23b347e5
Save LTN proposals in a more future-proof format (#894) 2022-04-21 04:40:00 -07:00
Dustin Carlino
78897ff29c Restore the bus route goldenfile test for a few maps, now that #372 is somewhat active again 2022-04-18 12:36:22 +01:00
Dustin Carlino
e1f27ec1f9 Add a smoke test that PT doesn't crash the simulation, and relax a check
to get this test to pass. #372

Now regenerate the maps with PT
2022-04-17 17:14:26 +01:00
Dustin Carlino
069348a8a7 Grab fresh OSM data for London 2022-04-13 17:26:02 +01:00
Dustin Carlino
54a7b08ee4 Don't run docker and try to import elevation data when importing one-shot maps from the UI. The results with SRTM aren't any good, and for people who happen to have docker, it can be a surprising and slow extra step. 2022-04-12 15:45:50 +01:00
Dustin Carlino
27e94662e8 Add a regression test to make sure A/B testing has no spurious diffs. #868
I made sure the test fails before the fix from
b89e716d0c
2022-04-09 18:17:24 +01:00
Dustin Carlino
36ef6d6b34 When merging blocks, try reversing the order of one. Otherwise, the
current mix of clockwise and counter-clockwise blocks don't combine.
2022-03-16 12:47:08 +00:00
Dustin Carlino
99747ff34e Make the LTN tool more robust to broken blockfinding. #841
Try the cheap validation first. If it breaks, fall back to the expensive
version.
2022-03-05 17:21:54 +00:00
Dustin Carlino
1ac25cc39a Find thick dual carriageway roads that overlap, and cut their width in
half.
2022-03-05 11:03:23 +00:00
Dustin Carlino
a421eaf900 Don't attempt to trace blocks around bridges/tunnels at all in Lyons, avoiding a crash there. #857 2022-03-01 15:24:59 +00:00
Dustin Carlino
460c03e75c Trace blocks starting from roads without sidewalks on both sides 2022-02-24 20:10:33 +00:00
Dustin Carlino
9c0aedb575 When we can help it, don't shift road polylines twice. #860 2022-02-23 18:46:42 +00:00
Dustin Carlino
ca5166107b Disable parking for #861 to make it slightly easier to get meaningful results 2022-02-22 09:37:08 +00:00
Dustin Carlino
6590320571 Prebake results for São Miguel Paulista, so we can use all the differential dataviz #861 2022-02-21 21:16:49 +00:00
Dustin Carlino
cb6a628149 When the pre-trimmed endpoint for a merged intersection is inexplicably not on a road's center line, just skip instead of crashing. This allows us to roll out the dog-leg intersection merging for many more maps and see pretty much universal improvement in map geometry! #654 [rebuild] [release] 2022-02-20 18:01:30 +00:00
Dustin Carlino
efe5f76bbe Improve the dog-leg detection around dual carriageways. Enable this for
Montlake! #654
2022-02-20 16:43:15 +00:00
Dustin Carlino
6a5366292f Make editing maps with transit stops a little more resilient. #372
Transit stop IDs previously were tied to LaneIDs, but those can easily
change with edits to the number of lanes on a road. We still may need to
re-snap transit stops (if the driving position or sidewalk changes), but
this prevents one more common type of problem.

This requires regenerating everything, since it's a binary schema
change...
2022-02-17 20:18:24 +00:00
Dustin Carlino
4d9074571b Regenerate 4 London maps. They wound up with parking lots and other
objects outside the study area boundary, because I changed the boundary
but forgot to first re-clip the .osm file. #794
2022-02-17 10:18:05 +00:00
Dustin Carlino
9054666a0b Use RDP simplification to road center-lines when we glue them together after collapsing degenerate intersections. This is a followup to #833.
And clean up some other things that RDP does better.

Fallout from regenerating everything:

- Enfield borough crashed, so removed it
- All UK scenarios are now much bigger, due to the changes in #853 being
  picked up
- Poundbury gridlocks now due to that
2022-02-10 14:40:11 +00:00
Dustin Carlino
e5704f4a6d Prevent many cases of blocks with overlapping geometry or that extend
too far, by not trying to trace near railways or cycle-only
bridges/tunnels. This is an imperfect heuristic, but it makes
significant progress in most maps.
2022-01-31 16:03:21 +00:00
Dustin Carlino
3d33d2743b Document the new synthpop crate.
I regenerated some scenarios; no diff. The prebaked summaries change a
bit, but not the prebaked results -- not sure, but going to proceed.
2022-01-28 13:13:43 +00:00
Dustin Carlino
638e93c36a Stop re-exporting stuff from synthpop in sim 2022-01-28 13:13:43 +00:00
Dustin Carlino
f171ddcb73 Get everything to build again... 2022-01-28 13:13:43 +00:00
Dustin Carlino
dfbd9785f3 While merging adjacent perimeters for the LTN tool, don't proceed if
intermediate results can't be turned into a polygon. It'll break
something later. #841

There's a particular bug where a perimeter can be turned into a polygon,
but after collapsing internal dead-ends, it can't.

If we don't do this, the LTN select boundary UI crashes, and reasoning
about block -> neighborhood mappings gets very hairy. I'd like to
address all the root causes of failing to make a polygon, but until
then...

TRADE-OFF: it _really_ slows down the select boundary UI.
2022-01-25 18:12:15 +00:00
Dustin Carlino
bd340a1970 Switch from std::fs to fs_err. When files aren't found, the error message actually includes the path! 2022-01-17 17:30:51 +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
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