Commit Graph

6249 Commits

Author SHA1 Message Date
Dustin Carlino
c1ac3cf39d Make Polygon::from_geojson preserve rings. This fixes the WIP elevation contours. #82 2021-03-25 15:15:53 -07:00
Dustin Carlino
92d3a890ea
Express all pathfinding costs in units of seconds. #82, #494 (#587)
This is simpler to reason about, allows the penalty for entering a zone
or taking an unprotected turn to be expressed in terms of a time
penalty, and is a step towards adjusting bike/foot routing for elevation
data.

When we later add things like "safety/quietness" for cycling, maybe we
can switch to using a (time, quietness) tuple, and transform into a
single number with a linear combination parameterized by that agent's
preference for time/safety. This change is compatible with that future
idea.

There are behavior changes here, particularly for zones and unprotected
turns. No new maps start gridlocking, and in fact, Rainier starts
working again.
2021-03-25 12:59:36 -07:00
Dustin Carlino
4c2bc89438 Use Rust 1.51 to build. None of the new changes affect the codebase, though. 2021-03-25 09:02:04 -07:00
Dustin Carlino
ce473928fa Use u64 to describe number of bytes in the Manifest, now that we have a massive GeoTIFF in there that breaks wasm's 2^32 usize limit. #586 2021-03-24 21:23:38 -07:00
Michael Kirk
61c46461e4
PERF: lower memory requirements for clip_osm (#585)
* PERF: lower memory requirements for clip_osm

- don't accumulate things unless they are at least partially within the boundary
- accumulate id's, not entire objects.

This entails doing a second pass of the file, but keeps memory usage
much lower.

e.g. a largeish area of Los Angeles, covering east hollywood to downtown, clipped thus:
- north: San Fernando Blvd
- east: LA River east of Downtown
- south: the 10
- west: Western ave,

Before: importing the above stalled out for me during clipping, which
had ballooned into swap at more than 16GB.

After: in the above scenario, clipping peaks around 55MB, and the import
process as a whole peaks during pathfinding - at around 4.0GB.

* fixup! PERF: lower memory requirements for clip_osm

Remove unnecessary casting
2021-03-24 18:03:33 -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
Michael Kirk
e672256828
Import screen UI fixups (#584)
* Import screen UI fixups

- even out the spacing a bit
- use underline style for "Alternate Instructions" web link
- left/right switch is more intuitive than right/left
- disambiguate label from toggle id
2021-03-23 15:11:14 -07:00
Dustin Carlino
162f09a887 Import Tripoli for WeCode Libya, also adding an Arabic font 2021-03-23 06:51:47 -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
1187c1ccf0 Bikes can use bus lanes in GB. Only disallowed in Poland now.
Not regenerating yet.
2021-03-22 18:50:26 -07:00
Dustin Carlino
e57cacaab4 Rename pathfind/driving -> pathfind/vehicles to reflect bikes using it too, and likewise for driving_cost 2021-03-22 16:34:46 -07:00
Dustin Carlino
7d2e8409e8 Implement no-through-traffic zones instead by adding a huge cost to crossing into the zones. #555, #574
Regenerate all maps. Gridlock-wise, Rainier and Poundbury broke, but
Wallingford started working again. Acceptable cost for a change this
useful; I'll work on fixing those maps later.
2021-03-22 16:34:46 -07:00
Dustin Carlino
e6cf2d54bc Rip out all of the special code for pathfinding into/out of access-restricted zones.
There's a much simpler implementation, it transpires. #555, #574
2021-03-22 16:34:46 -07:00
Michael Kirk
b6c5ee38c2 clarify "time difference" chart
- bar height represents accumulated time, not trip count
- buckets are from duration *before* edits
2021-03-22 15:59:20 -07:00
Dustin Carlino
75b39c7b35 Add a debug tool to show the pathfinding costs to each node. Trying to figure out why a new impl of pathing through zones isn't working as expected. 2021-03-22 12:03:50 -07:00
Michael Kirk
b07ac626d4 fixup proposal "tabs" 2021-03-22 12:00:43 -07:00
Dustin Carlino
9d2da632be Add some disabled validation that paths don't enter an access-restricted zone when they shouldn't.
I'm working on an overhaul to pathfinding and zones in another branch,
and need some more debugging tools. This one's ready to be checked in
now.
2021-03-22 09:38:53 -07:00
Dustin Carlino
c68d0fdc6b new release 2021-03-21 11:47:54 -07:00
Dustin Carlino
0572a5118b Add a map covering the north end of Cambridge. Also grab fresh OSM for the Great Kneighton map, at least fixing the crazy geometry at Portugal Place. cyipt/actdev#151 [rebuild] [release] 2021-03-21 11:24:33 -07:00
Dustin Carlino
01431827dd Fix a bug in the UI importer that happens the first time you run it. #523 2021-03-20 16:31:31 -07:00
Dustin Carlino
ca70d7c617 Fix the broadmoor proposal after the new OSM data import. #574
And fix the github build. [rebuild]
2021-03-20 15:30:34 -07:00
Michael Kirk
761e2e6412 new tab styles for info panels 2021-03-20 14:33:54 -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
a68af804e3 Pick the entrance/exit to an access-restricted zone more intelligently. #574
Instead of just picking the intersectin closest to the origin or
destination, calculate the full path length, and take the one with the
shortest distance. This fixes some of the weird problems routing around
Broadmoor. Regenerate all prebaked data.

Also fix the original request for paths involving zones, so tracing it
later works.
2021-03-19 19:24:22 -07:00
Dustin Carlino
cb4cd1b13a Don't recalculate failed paths in the freeform trip spawner. Makes
debugging #574 easier.
2021-03-19 17:48:37 -07:00
Michael Kirk
af079c24e6 rename txt.add -> txt.add_line 2021-03-19 17:48:30 -07:00
Dustin Carlino
58ee3175ac Add a new Seattle map focused on the Arboretum, for #574, along with
prebaked data for the baseline (because it doesn't gridlock, without any
interventions needed!) and a proposal for opening up Broadmoor.
2021-03-19 17:24:11 -07:00
Dustin Carlino
dcf2bf0422 Apply the Text::from(str) pattern in a few more places.
Found using: vi `./rgrep.sh 'Text::from(Line'|grep -v fg|grep -v
big_h|grep -v displa|grep -v big_m|grep -v small|grep -v second | grep
-v underl|grep2files `  (Some of those are local bash aliases)
2021-03-19 16:56:18 -07:00
Michael Kirk
affd582093 more concise Text / tooltip() 2021-03-19 16:48:54 -07:00
Dustin Carlino
2bebd8a2c9 Allow specifying go active scenario when launching actdev. cyipt/actdev#150 2021-03-19 16:25:37 -07:00
Dustin Carlino
d7b7c2d7cd Import a slice of London along the A5, including scenario data. It
gridlocks, of course.  #577
2021-03-19 15:51:43 -07:00
Dustin Carlino
edfb745bb2 Change the default color scheme to day mode. Behaviorally, this rolls out the change for the OSM viewer, 15m app, parking mapper, and map_editor. 2021-03-19 15:26:35 -07:00
Michael Kirk
2de212438f fix comment typos 2021-03-19 12:43:32 -07:00
Michael Kirk
cbad223a90 clarify scenario buttons & style link as link 2021-03-19 12:43:32 -07:00
Michael Kirk
62180432b9 increase tab contrast a bit more in dark theme 2021-03-19 11:56:22 -07:00
Michael Kirk
9da9c9b092 extract "percent" function, put header text first 2021-03-19 11:56:22 -07:00
Michael Kirk
cf14515110 CR: use already-defined transition 2021-03-19 11:56:22 -07:00
Michael Kirk
014bd56379 CR: clarify swap_inner_content method 2021-03-19 11:56:22 -07:00
Michael Kirk
9a2276c66d Code review: prefer unreachable to todo for checkins 2021-03-19 11:56:22 -07:00
Michael Kirk
3d5876a4fd fixup! convert trip tables to new tabs 2021-03-19 11:56:22 -07:00
Michael Kirk
8b685fd746 increase contrast of panel_bg vs the panel_section
Currently the color was only via transparency - so depending on what was
behind the panel, there was sometimes not enough contrast.
2021-03-19 11:56:22 -07:00
Michael Kirk
e493c02d83 convert trip tables to new tabs
The GenericTable machinery lost a lot of it's utility now that we have
proper tabs. I've left a couple of free functions to be shared, and
inlined the remaining simple functionality.
2021-03-19 11:56:22 -07:00
Michael Kirk
e39059644c fixup! wip apply tabs to TimeWarp 2021-03-19 11:56:22 -07:00
Michael Kirk
02d08fa262 fixup! style tabs 2021-03-19 11:56:22 -07:00
Michael Kirk
1d57bb5f25 wip apply tabs to TimeWarp 2021-03-19 11:56:22 -07:00
Michael Kirk
7f00154ae6 style tabs 2021-03-19 11:56:22 -07:00
Michael Kirk
be6be741f3 use daytheme in widgetry demo 2021-03-19 11:56:22 -07:00
Michael Kirk
ab787a5cd1 WIP: spiked tabs implementation for widgetry demo
TODO:
- tooltips (or is that just a responsibility of the button builder?)
- widgetry color scheme should use day-theme
- pick nice tab colors
- start applying!
  - jump in time
  - info panel
  - "more data"
  - fix width to match widest? Or maybe width modes?
2021-03-19 11:56:22 -07:00
Michael Kirk
bf52a84956 Fix crash when viewing settings in osm_viewer
Longer term I think we should default to day_theme for all widgetry apps.
That will be easier if we can get rid of pregame theme all together, but
that requires re-styling the pre-game screens (which we want to do, but
that will take time).
2021-03-19 11:03:40 -07:00
Michael Kirk
1c2231aced fix missized icon 2021-03-19 11:03:40 -07:00