Commit Graph

423 Commits

Author SHA1 Message Date
Dustin Carlino
8318bbf5d2 Fix clippy warnings. [rebuild] [release] 2021-12-05 12:29:35 +00:00
Dustin Carlino
258ed1c156 Download GTFS for Seattle and SF. #372
Not uploading the downloaded files yet, on a weird connection.
2021-11-19 10:38:01 -08:00
Dustin Carlino
fa5e1e4e95 Match OSM crosswalk nodes more carefully. #795
Some redundant internal points along a road are removed, but sometimes
these are crossings.
2021-11-18 13:16:44 -08:00
Dustin Carlino
c13ca2d20b
Rip out all old broken code for importing OSM bus stops and routes. #372 (#808)
This code stopped working around July 2020 when I attempted to tackle #190. It's sat dormant since then, with most bus and light rail routes not imported correctly at all. I'm going to (eventually) start another attempt at public transit in A/B Street by treating GTFS as the main source of truth, not trying to understand route relations mapped in OSM. It's simplest to just rip out all this old code first. Some of it may be useful later, but version control preserves it.

Regenerating everything; this is a binary format change.
2021-11-17 18:51:59 -08:00
Dustin Carlino
68d9616875
Use simple Rust code to specify map importing config, instead of conf… (#807) 2021-11-17 15:52:09 -08:00
Dustin Carlino
fd10ea74dc Add configuration to filter the auto-generaed crosswalks to only exist
near OSM highway=crossing nodes. #795

Not enabled anywhere, because it doesn't seem to produce good results.
Possibly footway=crossing ways need to be used for this as well.

Had to regenerate all maps, since the binary format changes.
2021-11-08 20:08:49 -08:00
Dustin Carlino
f615acc1f0 Increase the distance threshold for collapsing roundabouts. The tiny traffic circle ones prevent merging adjacent blocks and are causing headaches. #75
Regenerating everything...
2021-11-02 19:06:09 -07:00
Dustin Carlino
9f86365cf6 Upgrade to rust 1.56 and cutover to rust edition 2021 2021-10-21 09:38:06 -07:00
Dustin Carlino
ea0440b6b2 Import fresh Seattle OSM, with the new Northgate station and bridge!
lakeslice gridlocks, because a traffic signal marked on a footway near
23rd and Judkins gets assigned to an alleyway. Worth fixing later.

And wallingford crashes the sim; I think more lane-changing bugs
exposed. It's kind of freeing to not worry about maintaining the
simulation right now...
2021-10-04 18:35:42 -07:00
Dustin Carlino
ca4ddeb7a5 Delete 3 old scripts used to mass-import maps. #745 [rebuild] 2021-09-17 18:29:23 -07:00
Dustin Carlino
4547395067 Move the cycleway snapping step to happen just before RawMap->Map, so we can play with it in the map_editor. #330 2021-07-27 11:20:57 -07:00
Dustin Carlino
163244ace9 Trim dead-end cycleway and service road stubs. Not regenerating yet, but
spot checked in Tempe and the UDistrict.
2021-07-27 11:13:47 -07:00
Dustin Carlino
c28fef1752 By the power of my Mammal Hands, I will figure this out. #654 2021-07-19 15:07:10 -07:00
Dustin Carlino
e6f72449f4 Some fixes to get the Arboretum trails connected.
- Grab fresh Seattle OSM, picking up https://www.openstreetmap.org/changeset/108071529
- Treat highway=footway, bicycle=dismount as a cyclepath, for now
- Treat service=driveway, bicycle=designated as a cyclepath

Since this requires regenerating all maps anyway, also include some
stuff to improve Aurora near Green Lake:

- stop making highway lanes super wide by default; they just make
  divided highways overlap themselves
- filter out service roads with access=customers

But note the bridge from the Arboretum to Lynn is still disconnected,
because of detailed footway mapping that isn't tagged as
bike-accessible.
2021-07-18 20:52:41 -07:00
Dustin Carlino
d142b4fbd0 Refactor lots of the places walking along a PolyLine with a step size
Verified no behavioral change using the screenshot test. (Which only had
the driveway diff from b3ce53aa5f)
2021-07-16 14:17:08 -07:00
Dustin Carlino
38be4c0f68 Fixing small style/clippy problems and kicking off a [rebuild] [release] 2021-07-13 22:52:56 -07:00
Dustin Carlino
a1a97877a5 Better snapping heuristic: if only a small section of a cyclepath is close to a parallel road, don't snap it at all. #330 2021-07-13 17:55:58 -07:00
Dustin Carlino
9237afb439 Revive cyclepath snapping. #330
Several ways to output the results:

1) just write OSM tags to debug stuff, but keep the ways
2) write a KML file to visualize the perpendicular line checks
3) delete the cycleway and make it an attribute of roads instead

Many problems with the snapping heuristics, but enough progress to
commit disabled!
2021-07-13 15:33:07 -07:00
Dustin Carlino
2224dccda9 Add a tool in the main UI to try to merge junctions. #654
It maintains a JSON file of ways to merge that the importer also uses.
For maps fast to import, this is the nicest workflow. Unlike map_editor,
turns and trimmed roads can also be checked.
2021-07-11 13:19:00 -07:00
Dustin Carlino
1539091453 Import Loop 101, adding an option to skip local roads to cut down map
size.
2021-07-08 10:25:36 -07:00
Dustin Carlino
48076a4c5b Better stop sign placement -- degenerate roads shouldn't get them. Not
sure why this wasn't done before.

Regenerated all maps... but this happens to expose some lane-changing crashes.
2021-06-22 17:05:18 -07:00
Dustin Carlino
8f199177f5 Upgrade to Rust 1.53
- arrays are now iterable directly
- switch to using BTree{Set,Map}::retain!
- a round of clippy
- regenerate scenarios and prebaked data; not sure why, but there's a
  diff
2021-06-17 23:04:35 -07:00
Rémi Lauzier
1a4b997818 Fix some clippy warnings 2021-06-16 16:21:35 -07:00
Dustin Carlino
ef90721741 Fix missing study area polygons on the web. The refactor to Polygon::from_geojson_file introduced filesystem IO to the geom crate. Instead, we need to be explicit about how we do file IO.
Also fix some clippy errors
2021-05-20 14:33:04 -07:00
Vinzent Steinberg
82cbbfdf50 Remove outdated exception 2021-05-15 14:24:08 -07:00
Dustin Carlino
1edbca6509
Refactor most of the places extracting polygons from geojson files (#644) 2021-05-15 09:05:28 -07:00
Vinzent Steinberg
446a21696d
Fix most clippy warnings (#646)
* More conventional spelling of acronym identifiers

* `new` -> `new_state`

* Remove redundant field name

* Remove needless `collect`

* `to_controls` -> `make_controls`

* Simplify long if statement

* Fix module inception

* Simplify chained if let

* Return directly instead of creating a binding

* Disable clippy warning about `borrow` method

Implementing the `Borrow` trait instead would result in excessive type
annotations.

* Fix most remaining clippy warnings

* Allow clippy::type_complexity

* Fix bad merge from web editor

* Run cargo fmt

* Suppress large_enum_variant warnings

* Rename FYI state to ShowMessage

* Fix upper_case_acronyms warnings

Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2021-05-14 17:31:32 -07:00
Dustin Carlino
29c881ffc3 Switch from cargo +nighty fmt to the stable cargo fmt. Whatever edge-case formatting was happening with stable has been fixed 2021-05-14 08:39:51 -07:00
Vinzent Steinberg
fd3b0e2a14
Fix compilation failures and most clippy warnings (#642)
* abstutil: Fix compilation failure

* map_gui: Fix compilation

* traffic_signal_data: Fix compilation failure

* map_model: Fix compilation failure

* abstutil: Fix doctests

* abstio: Fix most clippy warnings

* abstutil: Fix most clippy warnings

* collisions: Fix clippy warning

* convert_osm: Fix clippy warnings

* sim: Fix most clippy warnings

* geom: Fix clippy warnings

* kml: Fix clippy warnings

* map_model: Fix most clippy warnings

* fifteen_min: Fix clippy warnings

* game: Fix many clippy warnings

* Disable some noisy clippy warnings

* headless: Fix clippy warnings

* importer: Fix clippy warnings

* map_editor: Fix clippy warnings

* map_gui: Fix clippy warnings

* osm_viewer: Fix clippy warnings

* parking_mapper: Fix most clippy warnings

* popdat: Fix clippy warnings

* santa: Fix clippy warnings

* sumo: Fix clippy warnings

* traffic_seitan: Fix clippy warning

* updater: Fix clippy warnings

* widgetry: Fix clippy warnings

* tests: Fix some clippy warnings

* Fix compilation on stable Rust

* Simplify unwrapping

* Make use of `Entry` more readable

* Fix formatting

* Fix code that was broken in the refactoring

* Apply cargo +stable fmt

* Fix code that was broken in the refactoring, second try

* Remove `Default` impls that are equivalent to `new`

* Remove obsolete clippy wrapper

* Avoid turbofish

* Prefer `unwrap_or_else` over allowing `clippy::or_fun_call`

* Remove redundant `into_iter`

* Fix typo

* Prefer `&& false` over commenting code out

* Fix some clippy warnings

Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2021-05-14 08:32:56 -07:00
Trevor Nederlof
4080d0d130
Add craft and office to import and add/reorg AmenityType (#638)
* Add craft and office to import and add/reorg AmenityType

* Remove bike rental/parking and rename BikeShop to Bike

* add in leisure and tourism tags, add more categories to AmenityType and remove lesser used tags

* add dependency on strum and strum_macros and removed some manual code for text display of Enum and Enum into string

* include lock file, fix color of buildings for amenity layer, fix formatting and use orders
2021-05-06 08:43:52 -07:00
Dustin Carlino
659ac7c34b Use the elevation_lookups image from Docker Hub, so finally elevation import can work on any Linux machine with docker. #82 2021-05-04 13:02:49 -07:00
Dustin Carlino
dd6bdfca72 Document root file workaround for docker. #82 2021-04-13 10:12:57 -07:00
Dustin Carlino
462baddf17 Robustify running the importer from the UI, for #602 and #82:
- Echo process output to the main UI's stdout, for easier debugging
- Remove the timing breakdown from elevation import, since it breaks
  when the function bails out early
2021-04-13 09:45:48 -07:00
Dustin Carlino
de20a74f3a Fix elevation imports, broken in b8318917a8. #82 2021-04-05 17:29:28 -07:00
Dustin Carlino
b8318917a8 Write to the proper data/input/shared directory for elevation. #82
It was always using the current directory, which breaks when running the
UI map importer from game/. [rebuild] [release]
2021-04-04 09:58:40 -07:00
Dustin Carlino
ee3f139765 Allow the docker command for elevation to fail. This unbreaks the tests, which import synthetic maps with strange coordinates. #82 2021-04-02 08:25:04 -07:00
Dustin Carlino
dc31e42c18 Add elevation data to all maps, now that the SRTM issues in elevation_lookups are fixed! #82
The results likely have some issues, but easier to iterate with them
baked in.
2021-03-28 21:52:54 -07:00
Dustin Carlino
7db3c6f951 Just triggering a [rebuild] [release] a bit early 2021-03-27 13:37:59 -07:00
Dustin Carlino
e3adb4702f Handle some changes to the elevation_lookups importing. #82 2021-03-27 11:45:55 -07:00
Dustin Carlino
4ef04f5bd1 Change road incline calculations to be stored in RawMap. Previously, the
"rise / run" calculation used the trimmed road center-lines, which don't
match up with the elevation at each original intersection point.

Also handle infinity in the output and reduce the resolution of the
query from every 1m to every 5m.

Regenerate all maps due to the map format change. Try bringing in
elevation data for all of Seattle using the LIDAR source, since
the data quality assessed in eldang/elevation_lookups#12 seems to be
similar, and LIDAR is way faster than contours.
2021-03-23 22:47:52 -07:00
Dustin Carlino
4a704e3172 Filter out highway=pedestrian, bicycle=dismount unless separate footpaths are enabled. Removes Portugal Place from Cambridge. cyipt/actdev#151
Now regenerate everything
2021-03-22 21:30:10 -07:00
Dustin Carlino
90e2e4f249 Grab fresh Seattle OSM to fix the entrance to Broadmoor for #537. Also
stop importing golf cart paths, even though they would be kind of
interesting to use for this proposal...

Interventions needed to keep lakeslice running, of course
2021-03-20 14:26:48 -07:00
Dustin Carlino
df58528d79 Scrape elevation_lookups output, filling out the elevation just at intersections. #82
Not regenerating all maps yet.
2021-03-18 17:48:33 -07:00
Dustin Carlino
2eeee65653 Start to integrate Eldan's elevation_lookups tool. #82
So far, just call it for Seattle maps. Store the data sources in S3.

Note this'll only run on my machine right now, unless you also build the
Docker image locally. Failures in elevation should be skipped for now.
2021-03-18 11:18:05 -07:00
Dustin Carlino
ffc4f4222d Remove the old SRTM code, which has always been broken. Remove the elevation from importer config; the new approach will detect the right data source to use automatically using the bbox. #82 2021-03-18 10:14:43 -07:00
Dustin Carlino
9984648379 Treat bicycle=designated on footways the same as bicycle=yes. And update Seattle OSM data again to pick up my fixes from yesterday. #330 2021-02-27 13:01:37 -08:00
Dustin Carlino
3a63c11303 Treat footways that allow bikes the same as the other shared-use trails. #330
This gets most of the Burke (and other trails) imported, though there
are still some lingering connectivity problems.
2021-02-26 17:23:21 -08:00
Dustin Carlino
603717a560 Remove the separate_cycleways experiment flag. Always import cyclepaths
mapped as separate OSM ways in all maps!!! #330
2021-02-26 14:58:57 -08:00
Dustin Carlino
601d367c32 Import highway=track as a separate cycle+footway. We identified https://www.openstreetmap.org/way/842138587 that really affects the Poundbury site. 2021-02-25 12:59:48 -08:00
Dustin Carlino
fa515054fb lcid was missing a friendly map name
and adjust the elevation query format
2021-02-24 17:26:23 -08:00