Commit Graph

7646 Commits

Author SHA1 Message Date
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
7e54241b4d To preserve edits in SMP, add a temporary way to ignore the old lanes in edits and use OSM.
Also stop trying to convert system proposals for different cities
entirely; it makes the logs very messy.
2022-05-14 09:59:58 +01:00
Dustin Carlino
213df7fa82 Some slight widgetry API changes in support of another project, which is -- I am only mildly ashamed to say -- is depending on it 2022-05-13 16:47:58 +01:00
Dustin Carlino
4ca0c24a60 Add tooltips to the pedestrian crowding layer 2022-05-12 14:10:49 +01:00
Dustin Carlino
a229bf9385 Add a layer showing pedestrian density. 2022-05-12 13:33:33 +01:00
Dustin Carlino
16e539a77c Fix the map editor when editing lanes along one road. 2022-05-12 09:05:12 +01:00
Dustin Carlino
0e284b73a9 Use bindgen to build gdal for the importer. Otherwise, I can't get libgdal-dev on a vanilla Ubuntu 22.04 machine to work. [rebuild] 2022-05-10 16:35:37 +01:00
Dustin Carlino
66eed93753 When adding a sidewalk to a road, get the direction correct. Was previously failing for one-way roads, and causing pathfinding to crash. 2022-05-10 16:19:51 +01:00
Dustin Carlino
d313bf089c When a secondary map is loaded for debugging, keep the scenarios in
sync, and add a keybinding to synchronize time.
2022-05-10 16:01:24 +01:00
Dustin Carlino
40e60be386 new release 2022-05-08 13:39:37 +01:00
Dustin Carlino
64b82cb3b7 Trigger [rebuild] [release] 2022-05-08 12:56:46 +01:00
Dustin Carlino
d8e8ab76b6 Rename rat-run to shortcut in the user-visible part of the LTN tool.
"Rat-run" is a politicized term. It's helpful to be more neutral during
consultations.
2022-05-08 09:58:47 +01:00
Dustin Carlino
8de65419e6 Mechanical refactor in code from "rat run" to "shortcut" 2022-05-08 09:45:07 +01:00
Chris Petkau
c7d0c5a7ca Format with rustfmt 1.4.38-stable.
Pass Copy types by value.
Bug-fix departure from previous behaviour by only recording a single exit intersection rather than all of them.
2022-05-07 22:06:11 +01:00
Chris Petkau
5eadce28f2 Format with rustfmt 1.4.38-stable.
Rename 'pair1' to 'pair'.
2022-05-07 22:06:11 +01:00
Chris Petkau
a319c77db1 Opinionated refactoring of intersection.rs.
- Favour iterator-based transformations over for-loops.
- Limit scope of mutable variables via extract-method.
- Body of if-let should generally invoke a function, to reduce indentation.
- With the appropriate granularity of functions, the if-return guard pattern can be utilized.
2022-05-07 22:06:11 +01:00
Chris Petkau
71d5d4f5d4 Opinionated refactoring to eliminate multiple levels of indentation, and to favour iterator constructs over for-loops. 2022-05-07 22:06:11 +01:00
Dustin Carlino
b4896ee450 Make untrimmed_road_geometry infalliable, in preparation for storing a
PolyLine instead of list of points.

This exposed two edge cases, fixed here:

1) While merging short roads near junctions, we sometimes create a loop.
   Filter it out immeditely.
2) If an OSM way is physically sharing geometry with another one
   invalidly, detect that and discard it much earlier.
2022-05-07 22:02:06 +01:00
Dustin Carlino
6974d26cac Don't create RawRoads too early (before splitting ways into actual segments). Otherwise, we can't enforce invariants on RawRoads properly. 2022-05-07 22:02:06 +01:00
Dustin Carlino
43c946a2b6 Fix crashing tutorial after Seattle OSM updates. #914 2022-05-07 15:20:42 +01:00
Dustin Carlino
cfd6b52ee5 Avoid a crash in the LTN draw filters along polyline tool. #912 2022-05-07 13:28:10 +01:00
Dustin Carlino
596bd5d04d Problem plot per lane too, sadly mostly by copying code 2022-05-07 13:04:09 +01:00
Dustin Carlino
586ee1c96d Show live time-series of problems per intersection 2022-05-07 13:04:09 +01:00
Dustin Carlino
3426d2e917 Refactoring problem type code in preparation for new info panel tabs 2022-05-06 15:31:37 +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
985a8826ee Get S3 data in sync. When switching laptops, I had forgotten to copy s3_abst_data/dev/MANIFEST.json, and some weirdness somehow happened 2022-05-06 12:37:38 +01:00
Dustin Carlino
1325c45013 Change how the relative problems layer works. Color roads and
intersections, using the same technique as the relative throughput
layer. Add tooltips to show specific before/after counts. This is much
easier to understand than #905
2022-05-06 12:03:27 +01:00
Dustin Carlino
e66112b3ea Click trip problems to time-warp. Useful for debugging spurious diffs in greater detail 2022-05-03 16:08:22 +01:00
Dustin Carlino
0fd39db440 Fix crash when drawing problems before edits. Need to use the unedited map 2022-05-03 13:45:00 +01:00
Dustin Carlino
bf1023af8e Fix the SMP proposed widths near Praça Getúlio Vargas Filho. More clear to model as one giant sidewalk 2022-05-03 13:24:08 +01:00
Dustin Carlino
53d8f5e699 new release 2022-05-02 22:31:47 +01:00
Dustin Carlino
cf99a579ba Just trigger a [rebuild] [release] 2022-05-02 21:28:38 +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
136eef3c3b Just rename center_points to osm_center_points to be more clear. https://github.com/a-b-street/osm2streets/issues/2 2022-05-01 21:33:44 +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
2c3157e889 I forgot to upload prebaked data for the previous commit 2022-05-01 17:56:46 +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
ae8d6f6cf2 Spinner widgets for distances are weird, because the step size probably shouldn't depend on the user's metric/imperial setting. Just flip the prior hack and always use meters for the spinners. Sorry not sorry USA users. 2022-04-30 15:32:24 +01:00
Dustin Carlino
aff8d8ceef Automatically change metric/imperial based on the map loaded. 2022-04-30 15:24:18 +01:00
Dustin Carlino
00c34ab8f6 Add proposed sidewalk widths for SMP, mapped by Gabriela.
Also add a little edit mode tool to auto-fix sidewalk direction, to
avoid a crash in pathfinding! We should enforce this eventually.
2022-04-30 15:00:51 +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
fd2bf7e2fc Show an alert message when WASM crashes. This is way better than silently locking up and people knowing they have to open the dev console to see the panic. 2022-04-30 14:01:33 +01:00
Dustin Carlino
19447b5a26 Create a layer to show where problems are occurring more or less. #859 2022-04-29 14:08:52 +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
4b446c754e Make leader agents call ahead before starting a turn. Don't make use of
this yet. #517

Dump the intersection state to JSON too for the UI debugger, to inspect
easily.
2022-04-28 12:50:23 +01:00
IliasN
6174bfc06b Added trim to remove leading and trailing whitespaces 2022-04-27 13:52:10 +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
dff4e17b28 Let the user make edits to switch between marked/unmarked crosswalks! 2022-04-26 16:42:37 +01:00