Commit Graph

424 Commits

Author SHA1 Message Date
Dustin Carlino
aa966d7533 Upgrade a bunch of dependencies 2020-11-11 12:02:53 -08:00
Dustin Carlino
a3bcf5181c Make the map editor be able to produce synthetic .osm, and use it to
create a map exemplifying the lane-changing problems of #382.
2020-11-11 10:44:45 -08:00
Dustin Carlino
07ac288e72 Refactor: rename Pt2D::from_gps to just gps.to_pt(bounds) 2020-11-10 12:00:43 -08:00
Dustin Carlino
8ab7855926 Update some throughput plot terminology. Also pin to upstream earcutr, now that a fix is merged. #331 2020-11-10 09:00:05 -08:00
Dustin Carlino
e0a8d82b61 Reorganize polygon files to importer/config, instead of data/input.
Nothing in data/input should be under version control; all of it is
managed by the updater. #326
2020-11-06 10:10:03 -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
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
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
004ca95842 Optionally just create a circle of some radius around the 'center' of a city. #326 2020-10-26 16:57:50 -07:00
Dustin Carlino
fda4c4da7b Refactor a few utilities, and use convex hull of the city boundaries to simplify them considerably. #326 2020-10-26 14:15:25 -07:00
Dustin Carlino
536971b641 Cleanup formatting after #371 2020-10-23 10:42:12 -07:00
Javed Nissar
c74dcf025f
Update georust (#371) 2020-10-23 10:41:00 -07:00
Michael Kirk
6025d89598
Mkirk/perf 2 (#370)
* perf: return Line iterator rather than Vec

avoids allocating vector memory, cleans up some call sites too.
2020-10-20 11:51:00 -07:00
Dustin Carlino
af70904377 Document as much of geom as I can before my battery dies. And a mechanical API changes, Angle::new_degs -> Angle::degrees 2020-10-19 19:55:05 -05:00
Dustin Carlino
87d233299a Use a HashMap instead of a BTreeMap in Scheduler's internals. Doesn't
affect determistic simulation, but yields a crazy speedup. #54

- 8 hours of downtown: 122s to 102s!!!
- prebake: 181s to 160s
2020-10-19 16:30:41 -05:00
Dustin Carlino
38394c4a08 Comment some code to clarify things in #365, and switch the color for
selecting unzoomed agents
2020-10-15 14:58:07 -05:00
Dustin Carlino
028d1df62c Allow selecting and clicking unzoomed agents. [rebuild] 2020-10-15 14:58:07 -05:00
Dustin Carlino
a1c53d5e1c Humble start to adjusting how distances and durations are printed in the UI. #331
Also trimmed out a few old UI settings; they kind of started as
experiments, but now the alternative feels useless to maintain.
2020-10-11 10:45:13 -07:00
Dustin Carlino
e38858129b Cleanups after https://github.com/dabreegster/abstreet/pull/363:
- cargo +nightly fmt
- upload new prebaked data
2020-10-10 12:24:42 -07:00
Sam
4c5a858238
Delay highlighting (#363)
* Initial storing of intersection delays

* Initial highlighting of delays on route

* Added label of delay

* Info overlay works

* Added supoprt for pedestrian delays (only intersection delay currently)
Bike also works, but is treated as a car, so the avg speed is flagged as very slow (Needs fix)

* Capitalised describe trip phase
Now uses min of (speed limit and vehicle max speed) for the maximum speed check
Added trip blocked time query
Lots of work on tool tips
Icons are broke

* Nearly complete, just fmting and a crash to fix
Color assertion?

* Fixed text font colour crash
Added new custom TextSpan size function

* Cargo +nightly fmt

* Cargo +nightly fmt

* Clion auto import formatting
Doesn't quite match the existing "changes"

* Fixing merge issues

* Fixing icon placement issues

* Requested changes (Part 1)

* Requested changes (Part 2)

Co-authored-by: Sam <a>
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2020-10-10 12:23:02 -07:00
Dustin Carlino
f1ec2fa4c4 Convert more doc comments for abstutil, convert_osm, geom, sim 2020-10-08 21:13:08 -07:00
Dustin Carlino
f258c50595 Organize import blocks using https://github.com/dabreegster/organize_rust_imports 2020-10-05 20:29:22 -07:00
Dustin Carlino
27d94945c6 Manually move mod block after the use block, to match what CLion does. 2020-10-05 20:29:22 -07:00
Dustin Carlino
fd212b474c Get wasm running again; cargo web was hitting
https://github.com/koute/cargo-web/issues/217. After adding some
debugging to that tool, discovered the problem was generic-array, pulled
in by the new geo version. Forcing that to the older version fixes
things.
2020-09-29 23:34:10 -07:00
Dustin Carlino
2ddd9a62ff Cleanups for #346:
- Add Distance::min()/max()
- Bring in log crate everywhere
- Consolidate traffic signal validation
2020-09-26 10:11:08 -07:00
Dustin Carlino
597ef473f2 Upgrade most dependencies 2020-09-24 09:36:26 -07:00
Dustin Carlino
70d2d1115e Store polygon indices as u16, not u64. Maps from 743MB total down to
620MB!
2020-09-04 13:12:06 -07:00
Dustin Carlino
568a64df91 Don't store Rings for Polygons without any holes. Total map size from 751MB to 743MB 2020-09-04 12:18:53 -07:00
Dustin Carlino
87cb44200f Prevent a crash when scaling polygons down. Experienced while watching the current demand panel. I swear I've fixed this before, but apparently not 2020-08-27 18:56:28 -07:00
Dustin Carlino
6b7747c37a Overhaul lane markings:
- Cut off the one-way markings before the end of the road, to stop stomping over turn markings
- Draw turn arrows to every road, not each lane
- Only draw turn arrows when a lane is restricted from going to some
  outbound lane. At most intersections, all turns are legal, so don't draw
  anything.

[rebuild]
2020-08-23 12:00:25 -07:00
Dustin Carlino
14c66c5528 A humble start to a Percent type for #274. There are so many places to
use it; just start a few in ezgui. Also a good time to object to the API
so far.
2020-08-20 11:01:59 -07:00
Dustin Carlino
2e93fdbf54 Fix parking aisle loops that cross the parking lot polygon. Closes #242 2020-08-18 15:12:12 -07:00
Dustin Carlino
a6a454d326 Add a tool to import external traffic demand data. The format and way of
calling the tool (not in the importer?) are just experiments right now.
2020-08-17 12:32:09 -07:00
Dustin Carlino
bc858fdbb3 Work around a crash on the intersection demand panel, reproducible by
watching https://www.openstreetmap.org/node/53214134 on the weekday
scenario. At some point, an arrow polygon with an inner ring is scaled
down, collapsing its points so much that the ring becomes invalid.
2020-08-14 12:09:06 -07:00
Dustin Carlino
58849d3d15 Small refactor: in most places, we can actually use String as the error type; Box<dyn Error> is only useful when errors of different types are propagated.
Nowhere in abst do we care about handling different errors differently
2020-08-13 07:12:06 -07:00
Dustin Carlino
3b49353df2 gracefully degrade if we cant make TurnGroups for a traffic signal. this
gets SF, Tokyo, and London to import!!!
2020-08-12 11:05:19 -07:00
Dustin Carlino
62bb82886d blaze through all the crazy errors in intersection_polygon, just
recording errors and falling back to circular geometry and not trimming
roads

also filter out highway areas like
https://www.openstreetmap.org/way/132705692, woops!

Manchester and NOLA now import...
2020-08-12 09:36:46 -07:00
Dustin Carlino
e35c69f6f3 ezgui Wizard (and its pet Cloneable)
Here lies a weird coroutine experiment
09/20/2018 - 08/07/2020
2020-08-07 14:04:41 -07:00
Dustin Carlino
00e8b8a8c2 work around ballard map crashing from tiny border. i tried valiantly to
extend short borders, but it can't be done in convert_osm clip. has to
happen later when trimming and making intersection geometry. too much of
a headache right now.

west seattle and krakow still broken because of short borders.

also grab fresh osm
2020-08-04 15:25:49 -07:00
Dustin Carlino
d22aa87139 rearrange Building internals for #176. edits can affect building
connections to driving/biking. just store the immutable stuff -- whether
there's parking in the building, the connection to the sidewalk, and the
physical driveway line. compute all the rest dynamically, so it responds
to edits without effort.

shouldn't be major behavior changes yet (besides maybe fixing some bugs
involving edits)
2020-07-31 12:49:33 -07:00
Dustin Carlino
03796fcd66 introduce the tiny walkable shoulder lane type. pathfinding penalty,
rendering adjustments. #176

the SharedSidewalkCorner geometry looks bad, but acceptable for now.
2020-07-30 13:42:36 -07:00
Dustin Carlino
2b9123d261 fix border intersection geometry when the road is too short. closes #251
while regenerating, also pick up landuse=grass as a park area. noticed
missing in krakow.
2020-07-28 13:41:12 -07:00
Michael Kirk
5f9e94cfcc
use monospace font to avoid clock layout jitter (#250)
* use monospace font to avoid clock layout jitter

* conventional naming
2020-07-28 10:39:18 -07:00
Dustin Carlino
e1e265db14 tighten up Polygon constructors to enforce an outer ring... in most
cases now.
2020-07-27 14:03:55 -07:00
Michael Kirk
fff938180f
Commuter Patterns: Larger shapes for border intersections (#247)
* Commuter Patterns: Larger shapes for border intersections

A substantial portion of traffic has an origin/destination off the map.
We were correctly tracking all this data, attributing it to a
"block" the size of the border "intersection"; However, the design
didn't accommodate the small "size" of the border intersections:

1. it was too small to meaningfully reason about the heatmap visualization
2. it was too small of a "hit" area for clicking and hovering
3. when in the "locked" mode, the hover text overlay was illegible.

Now we draw a larger arrow, representing the inward/outward/both-ways
direction of traffic which makes it easier to reason about the heatmap
color and accommodates an adequate hit area.

And the hover text is now printed over a white pill to maintain
legibility.

* Commuter Patterns: Draw border *behind* directional icon

* Code Review: code cleanup - no changes to behavior.
2020-07-27 12:07:51 -07:00
Dustin Carlino
74bf6e0974 get riding off-map to work for #190.
- handle living streets that allow buses in berlin
- don't connect LeaveMap nodes to anything else; people were getting
  creative and using them as shortcuts to effectively warp to a border,
  then come back into the map
- make should_use_transit understand transfers (and still just return
  the first leg)
- warp to bus routes by ID

still at least one weird bug left, seen in krakow. working on it next,
trying to keep these commits "small." not regenerating maps quite yet.
2020-07-27 10:37:21 -07:00
Dustin Carlino
a1e1e51b10 obviate need for make_arrow_outline by just putting together a
reasonable make_arrow polygon in the first place
2020-07-26 20:25:38 -07:00
Dustin Carlino
7a00839553 ditch osm-xml, make a new osm parser from scratch based on roxmltree.
skip unreferenced objects, make the output extremely easy to consume.
also fix timers in importer. this helps with #212, although the actual
problem there is weird.

regen everything. some parking lots change a bit, but not horribly, and
that code needs some attention anyway.
2020-07-25 13:52:41 -07:00