Commit Graph

5276 Commits

Author SHA1 Message Date
Dustin Carlino
4f2cda8d53 Reorganize data/system/ files by city! The only interesting change is
abstutil::path_all_maps becoming abstutil::list_all_maps. #326
2020-11-05 14:05:48 -08:00
Dustin Carlino
576e64e246 Consolidate integration tests from the map_tests crate and some of the
stuff smushed into game for some reason
2020-11-05 12:42:52 -08:00
Dustin Carlino
e17273dc31 Expose distance crossed per agent in the API. 2020-11-05 12:19:58 -08:00
Dustin Carlino
89a4e5bdcd Disable output from the snapped cycleways experiment. The output is
nondeterministic (for still unknown reasons) and the spurious diff when
the importer is run is a distraction.
2020-11-05 11:43:50 -08:00
Dustin Carlino
c8f6e4d2c9
Cache the currently loaded Scenario, instead of re-reading it from the filesystem or (shudder) web. #377 (#385) 2020-11-05 09:25:02 -08:00
Dustin Carlino
67530bec07 Future-proof file organization by changing map_name from a string to a
struct. Whatever choices we make next about naming cities hierarchially
or not can be managed in just one place. #326

This is a pretty huge change, but the compiler gives reasonable
confidence it's correct. More bugs are likely to crop up in the next
step, when filenames start being namespaced by the city too.
2020-11-04 17:26:32 -08:00
Dustin Carlino
d0b26f56b4 Track file size of data files in the manifest too, to more easily notice when they change 2020-11-04 14:35:20 -08:00
Dustin Carlino
b47121ec8b Make the generic KML viewer also support CSV files containing one (lat, lon) point. More convenient way to explore data for #87 2020-11-04 09:47:19 -08:00
Dustin Carlino
e99dd5bba7 Use inferred sidewalks for Leeds, after detecting another geometry bug
when building sidewalk corners. Raw sidewalks from OSM aren't suitable
for traffic simulation yet.
2020-11-04 08:46:06 -08:00
Dustin Carlino
21cd7a197d Run the experimental cycleway snapper phase for Leeds, after adding a
check to skip ways like https://www.openstreetmap.org/way/429285996,
which're unexpectedly loops.
2020-11-03 15:57:21 -08:00
Dustin Carlino
77979706c6 Upload the Leeds data to S3, for #375 2020-11-03 10:56:54 -08:00
Robin
edf5d0d8a9
Add Leeds (#375) 2020-11-03 10:53:14 -08:00
Dustin Carlino
c481567ebb Cut over from Dropbox to S3. #195, #326
Uploading files individually to Dropbox is flaky, and the unique URL per
file complicates data/MANIFEST.

While we're at it, start carving aside a directory structure for keeping
data for the last few releases.

[rebuild] to make sure github actions can download everything
2020-11-02 17:36:02 -08:00
Dustin Carlino
b2519e3050 Add an extra check for polyline intersection endpoints. I found an
intersection polygon in Krakow that has really bad geometry, and this
improves it. The extra check absolutely shouldn't be necessary, but of
course, all the core line intersection code is quite suspect! #161
2020-11-02 15:10:45 -08:00
Dustin Carlino
ba9d14102f Set the wasm MIME header in S3, to speed up initial web loading 2020-11-02 12:30:56 -08:00
Dustin Carlino
28aaae110e Make the native and web file loaders detect binary/JSON files from the extenson. This unbreaks the dump_scenario example described at https://dabreegster.github.io/abstreet/dev/api.html#working-with-scenarios 2020-11-02 12:18:10 -08:00
Dustin Carlino
4cd18047bd Fix the random_scenario tool by adding --scenario_name and saving a
binary scenario file
2020-11-02 12:01:37 -08:00
Dustin Carlino
0fcd7af895 A few improvements for the OSM viewer:
- hotkey to expand the city picker to the full list
- add a button to edit an OSM way (just for roads, not sure there's
  value for intersections, parking lots, or buildings)
- include the Z-order picker
2020-11-02 11:35:49 -08:00
Michael Kirk
dcabbc9718
fix crash in tutorial on web (#376)
This file is used in step 6 of the tutorial.

As a desktop app, we had a bunch of files we just read from disk when
needed. Translating this to web requires some thinkging (things are
slower, they can fail, etc.).

As a first step we simply agglomerated all the files into the wasm
binary, but since some of the files are rather large, we tried to only
include the essential and small files.

This one was missed. Though some of the prebaked results files are very
large, this one is a mere 5k.
2020-11-02 11:10:21 -08:00
Dustin Carlino
6e417340e4 Generate turns much more simply for intersections of footpaths. #161
Also gets rid of some annoying warnings about roads with missing names.
I could continue to skip the warning for more situations, but I think
this sort of data quality check could be done better in the OSM viewer.
2020-11-01 18:20:32 -08:00
Dustin Carlino
c210b0a1bd new release 2020-11-01 10:30:03 -08:00
Dustin Carlino
5862835196 Fix content type on the html web runner page. Without this, initially
loading jumped to >30s with a warning in the console. Back to the usual
few seconds with this fix.
2020-10-31 18:37:46 -07:00
Dustin Carlino
8920c2c0b8 Store gzipped files in S3 and decompress upon loading. A few basic tests
showed this is faster than downloading the uncompressed files, but of
course it probably depends on network speed vs CPU. #326

Also cut over the updater to use gzipped files using flate, instead of
single-file .zip's. [rebuild]
2020-10-31 18:09:48 -07:00
Dustin Carlino
b46c3d26eb Don't infer sidewalks for the plethora of demo maps 2020-10-31 17:06:48 -07:00
Dustin Carlino
3e6e10f45a Show better error messages in the web file loader for HTTP errors, instead of trying to decode the HTML body of the 404 page 2020-10-31 10:10:01 -07:00
Dustin Carlino
4624baad0b Woops, binary format of MapConfig changed, so regenerate all maps 2020-10-31 10:08:05 -07:00
Dustin Carlino
04b9eef24a When using OSM footpaths, don't stick sidewalks on the road when sidewalks=separate and also bring in cycleways and paths allowing foot traffic. #161 2020-10-30 15:16:19 -07:00
Dustin Carlino
ca2ff08d71 Don't render intersections between footways with a special color. Also
cut Kraków over to using the new experimental footpath support. #161
2020-10-30 14:11:00 -07:00
Dustin Carlino
bf0dce2c18 Optionally import sidewalks and separate footpaths exactly as they're in OSM, instead of attempting any inference. This is a way to move forward on #161 without having to cutover to it all at once. 2020-10-30 13:27:45 -07:00
Michael Kirk
b1f4ca0b1b
loading screen (#373)
fancy loading screen
2020-10-29 18:39:51 -07:00
Dustin Carlino
57bb97ced0 On web, don't actually quit when the last state is popped. The app just awkwardly hangs if you do that. 2020-10-29 16:25:05 -07:00
Dustin Carlino
771dcd1c34 Plumb through failures (like 404) through the web file loader 2020-10-29 15:54:01 -07:00
Dustin Carlino
f05d041c02 Handle duplicate files on web when they're both bundled in and uploaded to S3. In particular, don't crash on the all city picker on web. 2020-10-29 15:26:36 -07:00
Dustin Carlino
bb081bbd28 Don't assume an autocomplete widget will be consumed after a value is chosen. In particular, if the user types nonsense into the city picker and presses enter, don't crash. 2020-10-29 15:18:15 -07:00
Dustin Carlino
1707b6fe37 Consolidate some PolyLine geometry code, and refactor some geom->geojson
mappings
2020-10-29 12:23:39 -07:00
Dustin Carlino
f187cf4bd8 Add an API call to export intersection geometry to geojson, for experimental streetmix3d integration.
To get an example:
> cargo run --bin headless -- --port=1234
> curl http://localhost:1234/map/get-intersection-geometry?id=291
2020-10-29 12:00:34 -07:00
Dustin Carlino
3ed7e73aa8 Use a u64 RNG seed, not a u8 2020-10-29 09:25:07 -07:00
Dustin Carlino
c8b565e57b Make the city picker handle 100's of maps slightly better, by splitting out into a separate list with autocomplete 2020-10-28 16:08:09 -07:00
Dustin Carlino
304e723d77 Fix scrollbar dragging, which was broken because the Slider gets
recreated while we drag.

But there's still something wrong, because in the OSM viewer with a huge
list of buttons, scrolling is incredibly laggy while dragging, but not
when using the scroll wheel.
2020-10-28 13:56:08 -07:00
Dustin Carlino
37896c9d37 Don't draw building paths in the OSM viewer. They're messy and don't reveal anything semantically interesting, whereas in A/B Street it's kind of important to see which road a trip will begin/end at for buildings on corners 2020-10-28 12:17:05 -07:00
Dustin Carlino
0167b4be31 A tiny start to the great UI button refactor: make the "X" button
consistent. #331
2020-10-28 12:04:36 -07:00
Dustin Carlino
3b838c1225 Finish formatting distance/duration/speed units nicely. And remove the
number of lanes from trip info; it's misleading and not useful. #331
2020-10-28 11:33:48 -07:00
Dustin Carlino
41712b5beb I somehow managed to break pedestrian rendering in 004ca95842 2020-10-27 15:41:33 -07:00
Dustin Carlino
3b26d25fe4 Build a wasm binary that jumps straight into the OSM viewer 2020-10-27 15:34:58 -07:00
Dustin Carlino
57b3d0719d Make a way to jump straight into the OSM viewer from the command line. Also slightly collapses some of the app startup creation flow 2020-10-27 15:17:21 -07:00
Dustin Carlino
0ddfb201d9 Get some parts of Tokyo to import, by adjusting the filter for city-like
boundaries and by preferring English filenames. #326
2020-10-27 14:10:42 -07:00
Dustin Carlino
fd1afbad02 Speed up the OSM viewer's business search panel. It was constantly recalculating the entire thng 2020-10-27 12:52:26 -07:00
Dustin Carlino
ae62bf082e Consolidate Slider and AreaSlider. They share most logic, just look different. 2020-10-27 12:13:20 -07:00
Dustin Carlino
6a8e01d4cd Remove an unnecessary slider from the polygon debugger, and lock down set_percent, which is causing some scrollabr dragging bugs. 2020-10-27 11:31:37 -07:00
Dustin Carlino
b4c39a0850 An initial script to mass import cities. #326 2020-10-26 17:46:53 -07:00