Commit Graph

668 Commits

Author SHA1 Message Date
Michael Kirk
12b220d606 replace proper "edit" (pencil) icon 2021-01-21 15:25:46 -08:00
Michael Kirk
7270ff31af use icon button for "jump to time" 2021-01-21 15:25:46 -08:00
Michael Kirk
f382c08d55 replace text arrows with svg arrows for traffic signal editor 2021-01-21 15:25:46 -08:00
Michael Kirk
0f476b6a36 pagination uses icon button 2021-01-21 15:25:46 -08:00
Dustin Carlino
02dc473d1e Reorganize importer code, so that regenerating all cities can be done
under a single Timer, which helps understand where time is spent. #326
and #262
2021-01-19 12:52:56 -08:00
Dustin Carlino
dfd1d2af93 Repair the Lake Wash Blvd proposal after changes that brought in more OSM IDs. #462 2021-01-19 10:57:20 -08:00
Michael Kirk
d7445d889e
button revamp groundwork (#459) 2021-01-19 10:10:18 -08:00
Dustin Carlino
f34e00e52d Upload Warsaw data to follow up on #461 2021-01-18 18:00:30 -08:00
Filip Czaplicki
c6e211cc77 Map: Warsaw 2021-01-18 17:58:05 -08:00
Dustin Carlino
a6c61e4fae Use Great Kneighton study area for Cambridge, not Trumpington. And bring
in Chapelford too. #449
2021-01-17 17:35:11 -08:00
Dustin Carlino
4c6d7af76d Bring in linear pedestrian highways as cycleways+shoulders. #458
Also give living_streets in Krakow shoulders, so foot routing works
better there.

Now regenerate everything. Actually messes up routing for Trumpington;
71 cancelled trips up to 101. And have to intervene to keep lakeslice
not gridlocking, as usual.
2021-01-16 17:03:13 -08:00
Dustin Carlino
df16c30b77 Add shoulders for foot traffic on separate cycleways. #330
For the moment, this is the simplest way to allow foot traffic. This
breaks down in places like
https://www.openstreetmap.org/way/49207928, where the road gets an
inferred sidewalk and the separate cycleway on each side is
bidirectional with shoulders on each side.

Down to 71 cancelled trips in the baseline for cyipt/actdev#32.
2021-01-16 09:30:22 -08:00
Dustin Carlino
0a353f67f8 When importing external scenario data for cyipt/actdev#32, snap border endpoints based on the allowed modes of each border. Without this, some driving trips snap to the cycleway next to a road.
212 cancelled trips (that immediately failed) down to 140.
2021-01-15 21:45:42 -08:00
Dustin Carlino
87f13a0d0c Improve crosswalk rendering, by orienting each dash perpendicular to the line of the crosswalk. This wasn't true for some degenerate intersections where the turn first crosses part of the sidewalk. #457 2021-01-15 21:15:10 -08:00
Dustin Carlino
48a60c965b For extremely short roads (under 2 meters after calculating intersection
geometry), don't generate crosswalks or stop signs. In reality, these
usually represent the middle of a complicatd intersection. Ideally these
cases would be merged into a single intersection, but before that's
feasible, at least improve some of the inferred things nearby. #457
2021-01-15 15:32:01 -08:00
Dustin Carlino
6ba1cfe8a1 Import Detroit for #452 2021-01-14 18:06:52 -08:00
Dustin Carlino
909ebe35a2 Refactor the cyipt/actdev#32 scenario importer. Expressing in terms of OD is cleaner. 2021-01-14 17:48:17 -08:00
Dustin Carlino
3143b57b19 When importing external scenario data, snap points outside the map boundary to the nearest border.
Now the desire lines for cyipt/actdev#32 import without errors.
2021-01-14 17:32:44 -08:00
Dustin Carlino
a7f3e998b7 Start to generate two simple scenario from actdev desire lines. https://github.com/cyipt/actdev/issues/32 2021-01-14 10:31:21 -08:00
Dustin Carlino
0be06d04f9 Switch to maintained version of earcutr.
Since we have to regenerate everything anyway, also start importing
landuse=meadow areas for #449.
2021-01-14 08:29:49 -08:00
Dustin Carlino
7ffb2d108f Treat cyclepaths as lower priority at intersections with regular roads,
to more realistically guess stop signs. #330, #450
2021-01-13 16:56:55 -08:00
Dustin Carlino
f680de73aa Remove London from screenshot testing, and use Cambridge instead. #449
This will make it easier to visually track the progress improving the
import. Originally London was added to have one left-hand driving map
under the test, but Cambridge works for that too, and it also includes
separate cycleways.

Also fix a crash when trying to draw very very tiny arrows.
2021-01-12 12:30:21 -08:00
Dustin Carlino
a1988f269c Based on importer config, try using separate cyclepaths directly. #330
Small adjustments to unzoomed rendering and stop sign placement.

Regenerate all maps because of the format change, but only Cambridge
changes. Since we're doing this anyway, also pull in leisure=garden.
2021-01-12 11:13:45 -08:00
Dustin Carlino
243a4b3410 Fix cycleway:left with left-hand driving. #449 2021-01-12 09:41:51 -08:00
Dustin Carlino
4e3af638e7 Import landuse=recreation_ground as a park. Noticed Rainier Playfield missing. 2021-01-11 21:23:02 -08:00
Dustin Carlino
ba2bbab2ae When inferring sidewalks on one-ways, don't forget to consider the driving side. 2021-01-11 15:07:22 -08:00
Dustin Carlino
b4cee2d6f9 Start importing parts of Cambridge for https://github.com/cyipt/actdev/issues/26.
I did
https://dabreegster.github.io/abstreet/howto/new_city.html#including-the-city-to-ab-street-more-permanently,
using
https://github.com/cyipt/actdev/blob/main/data-small/study_area_trumpington-test.geojson
2021-01-11 14:23:52 -08:00
Dustin Carlino
0eda6307cd Defer creating TripSpec until the trip actually starts. #258
This speeds up scenario instantiation (because picking a bus to use can
be spread out over time) and is a step towards simplifying the spawning
code. Starting downtown goes from 12.8s to 2.2s.

All vehicles spawning at a border now regress to using the 1st valid
lane, instead of random. Now that the choice is made when the trip
starts, this could later be improved to pick the least loaded lane.

Now regenerate everything.
2021-01-10 18:55:38 -08:00
Dustin Carlino
26f3726abd gzip two large SVG character files to trims down wasm size more for #377. game from 31MB to 24MB!
I didn't have to do anything to gunzip, because usvg is such a magical
crate that it already has flate2 support baked in.
2021-01-09 09:26:41 -08:00
Dustin Carlino
2972fef609 Trim wasm size for #377
- Remove one of Holly's characters, since it's still unused
- Exclude assets/music

game from 54MB down to 31MB
2021-01-08 17:41:53 -08:00
Dustin Carlino
6e3ce1d9ee Stop generating footways and service road KML files out of Seattle. They're only used for debugging, and not actively. For cities with multiple maps, the order of importing maps causes the files to get overwritten anyway. 2021-01-08 09:44:38 -08:00
Dustin Carlino
afceb5e268 Adjust Leeds import: #444
- stretch central polygon a bit to avoid crash when clipping
  https://www.openstreetmap.org/way/511767781
- rename polygons ("center" to "huge", and removing the "leeds_" prefix
  from the others)
- generate a region overview from the huge map
- only import/match collision data on the huge map
2021-01-08 09:29:45 -08:00
Dustin Carlino
b487678ee0 Delete all out-of-date manual overrides for traffic signals, and make it
a hard error when they become out-of-date going forward.

Better heuristics make some of these unnecessary. And now the the JSON
files are in this repo, updating files manually when pulling down new
OSM data becomes less tedious.
2021-01-07 12:24:07 -08:00
Dustin Carlino
f28bdc9b9e Grab new Seattle OSM data with some junction=intersection tags in Montlake and along Aurora. #114 2021-01-07 11:11:59 -08:00
Dustin Carlino
4cf133cc32 Make the new screencaps preserve alpha properly by switching to
premultiplied alpha. See option 1 of
https://stackoverflow.com/a/24380226

Upload the "new" screenshots (and lakeslice map)!
2021-01-05 18:28:30 -08:00
Dustin Carlino
4c348779db Adjust a signal in lakeslice and regenerate prebaked data after changes yesterday. The signal timing is necessary to workaround an unrelated roundabout gridlock bug at a nearby intersection, unfortunately. 2020-12-31 11:25:18 -08:00
Dustin Carlino
60e7c91d03 Handle one-way roads more uniformly in the traffic signal heuristics. #8
Previously, dual carriageways (pairs of one-way roads in opposite
directions) mostly didn't get any signal templates successfully applied.
This change ignores outbound-only roads when applying the templates. In
one fell swoop, lots of previously broken signals along places like
Aurora Ave suddenly work reasonably.
2020-12-30 15:28:17 -08:00
Dustin Carlino
df59b477a5 Start importing Bellevue. Treat it as a separate city from Seattle, and
don't even check if Soundcast data covers it yet.

Now regenerate all map data.
2020-12-30 13:21:59 -08:00
Dustin Carlino
bc5c4d3b2e Fix importer bug from 14f692fc39 that meant Seattle maps aren't touched when running with --raw and --map 2020-12-29 08:44:54 -08:00
Dustin Carlino
b7061ed425 Handle the junction=intersection tag in OSM, representing a short "road"
in the interior of a big intersection. #255, #114

- No sidewalks or parking on it
- Automatically try to merge it

Bring in fresh Seattle OSM with a few places on Aurora tagged, for
further experimentation.

Also, there's some bug in the importer; Seattle maps didn't get
regenerated last change. Picking up the diffs now.
2020-12-28 19:43:40 -08:00
Dustin Carlino
c6749c4cd3 Calculate angle to intersection using the first point, farthest away. #114
For the (still disabled) cases of merging short roads, this helps
immensely. It doesn't affect most other maps visibly. Makes a few
already broken things in Krakow and London slightly worse, but don't
care, because they didn't look sane before either.
2020-12-28 18:19:03 -08:00
Dustin Carlino
001aa836d2 Organize assets that're baked into widgetry. They don't belong in the
data/ directory, because they're statically bundled; they're not
actually read from the filesystem. #253

Two SVGs get duplicated between widgetry and abst assets -- dont_walk
and arrow_drop_down.
2020-12-28 10:40:55 -08:00
Dustin Carlino
14f692fc39 Turn more code in the importer into config. Ideally we just have code
for all the custom extra import data. #326

Verified there are no changes when importing the affected cities (except
for renaming the original OSM input file for Leeds to match the
geofabrik source)

Woops, and fix updater uploading with the compressed_size_bytes change.
2020-12-22 13:38:29 -08:00
Dustin Carlino
0fc0b8db65 Distinguish uncompressed/gzipped size in the updater tool. #377 2020-12-21 15:32:09 -08:00
Dustin Carlino
3966f10f17 Hunt for more music 2020-12-18 17:19:05 -08:00
Dustin Carlino
77fcd04402 Different music per level 2020-12-18 16:26:39 -08:00
Dustin Carlino
2823c04338 Finalization flurry...
- Tune colors in the experiment
- Regenerate maps again -- I forgot that the parcel data gets joined in
  a later importer step.
- Add some of the new maps as levels
2020-12-18 14:24:45 -08:00
Dustin Carlino
0b8c86e2c8 Adjust the threshold for what counts as a straight vs right turn from 10
degrees to 30 degrees. It works around the issue in #428, but it doesn't
solve the root cause there, so the unit test is also adjusted to provide
a way to solve the harder problem.

Regenerated all maps accordingly. Many traffic signals tended to
improve, with a straight turn marked protected, instead of permitted as
a "right turn."
2020-12-18 12:06:16 -08:00
Dustin Carlino
ee0d73847e Add more small Seattle maps for the experiment -- and who knows, maybe also useful for traffic sim
And unbreak the importer, cargo check doesn't build with features! Argh.
2020-12-18 11:00:15 -08:00
Dustin Carlino
d4fa67ac87 Make the one-mode path guesses more precise in their start/end locations. Noticeable effect is in the freeform agent spawner, the paths actually go between buildings now, instead of lane starts. 2020-12-16 15:49:03 -08:00