Commit Graph

5854 Commits

Author SHA1 Message Date
Dustin Carlino
802e020520 Import a SUMO network, transform it into an ABST map. So far, this gets
lanes and intersections displaying, but with lots of problems.
2021-01-05 12:44:38 -08:00
Dustin Carlino
eb9bf77bf0 Use roxmltree/std to get an error implementation and make using it more ergonomic 2021-01-05 11:37:48 -08:00
Dustin Carlino
e99def9124 Switch all error handling to anyhow. Nothing consumes our code as a
library yet, so this is a step forward from string errors. Manually
tested how errors show up (including the nice with_context bit).
2021-01-05 11:35:03 -08:00
Dustin Carlino
cd7dca87d7 Fix web build after rand upgrade. Unfortunately I think this has to happen in all of the binary crates individually: https://docs.rs/getrandom/0.2.1/getrandom/#indirect-dependencies 2021-01-05 11:12:03 -08:00
Dustin Carlino
bc3c3dfd6c Rename phase -> stage in the JSON traffic signal format. Meant to do this a long time ago. #295
Make this schema change backwards compatible for player edits.
2021-01-04 11:18:17 -08:00
Dustin Carlino
dedb041bdb Move CameraState to map_gui. Now widgetry has no dependency on abstio! #253 2021-01-04 10:39:15 -08:00
Dustin Carlino
bfa208ce6a Parameterize widgetry on a way to read SVG files. This is one of the last steps to remove the dependency on abstio. #253 2021-01-04 09:53:24 -08:00
Dustin Carlino
d529ae2e5c Upgrade usvg and rand 2021-01-04 09:19:54 -08:00
Dustin Carlino
965d999199 Upgrade misc other dependencies 2021-01-03 20:01:27 -08:00
Dustin Carlino
2945913fb3 Upgrade rand 2021-01-03 19:48:03 -08:00
Javed Nissar
c0c7e22c40
Add dist from sidewalk to cost to improve illustration of distance (#443) 2021-01-03 17:59:39 -08:00
Dustin Carlino
53227b6ec6 new release (and finally add a little more automation for this step) 2021-01-03 12:23:47 -08:00
Dustin Carlino
54968abeb1 prep for release. [rebuild] [release] 2021-01-03 10:34:21 -08:00
Dustin Carlino
5c04923dff Split abstio crate out from abstutil. #253
widgetry, geom, and abstutil may wind up on crates.io in some form to
let other projects use widgetry. abstio has A/B Street-specific tricks
for reading data on native/web. Note widgetry still depends on abstio,
will figure out how to clean that up next.
2021-01-02 10:28:00 -08:00
Michael Kirk
147c36d8fe
remove broken popdat main (#441)
I broke this in acadad8bd

We could fix this by making main async and fetching CensusAreas and
passing them into the generate function... but it doesn't seem like
we're using this any longer anyway.
2021-01-01 21:37:45 -08:00
Dustin Carlino
795c6bebb1 When producing GeoJSON, represent Polygons that arent Rings (like from SVGs) as a MultiPolygon of every pre-calculated triangle. #440 2021-01-01 15:33:11 -08:00
Dustin Carlino
b7d025b6a6 Simplify DrawRoad a bit (center line and label in the same batch). Include it in GeoJSON export. #440 2021-01-01 15:18:01 -08:00
Dustin Carlino
6119042b4f Reorder points when converting a PolyLine to a Polygon, so that the
result is usually a Ring. This gets lanes to render in the GeoJSON
export. #440

Ideally all Polygons would be expressed as an outer Ring and some
optional inner Rings. There are a few cases where this is hard, and we
instead just rely on the triangulation for rendering and point
containment and give up on GeoJSON export.

Not regenerating all maps yet -- zero screenshot diff, the map file does
change, but not sure how.
2021-01-01 15:03:09 -08:00
Dustin Carlino
302ec94e3d Try exporting the zoomed-in rendering of a map to geojson. #440
This approach has some manual effort and it's not capturing everything
yet, but it's a start.
2021-01-01 12:46:25 -08:00
Michael Kirk
acadad8bdf
fetch US census data from a hosted FlatGeoBuf (#432) 2020-12-31 16:20:32 -08:00
Dustin Carlino
d7afe4d318 Add a fastpath to the updater to 'download' from a local copy, to undo local temporary work more easily. 2020-12-31 12:44:31 -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
312a721e63 Fold the separate seattle_traffic_signals git repo back into this one.
Originally it was split out to organize a separate volunteer mapping
effort, but that never took off, and it's unlikely to happen. When we
have to occasionally update the prebaked signal data for some
intersections, it's unnecessary friction to update the other repo.
2020-12-31 11:01:48 -08:00
Dustin Carlino
9c63d9a181 Make a quick way of marking roads in the UI, dumping to a list, then
later overriding a .osm file with tags for these roads. This is a way to
test the effects of making simple OSM changes locally before
upstreaming.

Also handle repeated merging collapsing one of the roads. Not 100% what
happens here, but skipping the collapsed road works fine. The scary
Montlake intersections now look great with all the merging done, so
upstreaming the change! #114
2020-12-30 18:31:39 -08:00
Bruce
d47f2d84f3
Queue::try_to_reserve_entry needs improvement (#439)
If an intersection is short, and bike is spawned, another bike coming along will attempt to fit if force_entry is true. This results in a panic. To address this, if the reserved_length is >= the geom_len, false will be returned, even if forced_entry is true.
2020-12-30 18:08:43 -08:00
Dustin Carlino
629ee92a7e I got the turn restriction preservation direction wrong earlier. Now
everything along Aurora looks fine, but maybe I wrote the other way when
testing in Montlake earlier. Guess I'll find out soon. #114

Not regenerating all maps yet, since more churn is on the way.
2020-12-30 17:30:05 -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
9bc761f98e Explicitly model U-turns. Sometimes they're legal, often they get
generated incorrectly, but regardless, calling them TurnType::Left is
just confusing.

For the moment, always filter out U-turns from merged intersections.
When connections across merged one-ways are handled properly, we won't
need this, but in the meantime, it moves forward. #114

Not regenerating just yet, but will bundle it with the next commit.
2020-12-30 11:11:20 -08:00
Dustin Carlino
de4b026920 More turn restriction preservation... #114 2020-12-30 10:01:23 -08:00
Dustin Carlino
cdd3407165 Prevent the minimap from crashing when windows are minimized on Windows 2020-12-30 09:44:40 -08:00
Dustin Carlino
31400109fe Another case of preserving turn restrictions across road merges. Except
it only fixes a banned u-turn in one direction... still, progress. #114
2020-12-30 09:44:01 -08:00
Dustin Carlino
766fc57ca5 Work on preserving one case of turn restrictions across road merging. #114
Not updating the Montlake map yet.
2020-12-30 09:02:43 -08:00
Dustin Carlino
f6f5f49329 Add WASD alternate santa controls for someone with broken arrow keys. 2020-12-29 19:37:54 -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
64ef2f025a Restore the ability to merge short roads at the RawMap layer and in the
map_editor. It was nuked in 182f5139a5,
when I decided the MapFixes approach wasn't worth it. #114

The restored version doesn't attempt to handle turn restrictions again
yet.
2020-12-28 17:21:20 -08:00
Dustin Carlino
172dbf359c Try merging intersections with concave hull instead. #114 2020-12-28 16:05:41 -08:00
Dustin Carlino
17665a3d18 Prototype a simple idea for calculating merged intersection geometry using the original attempted shapes. #114 2020-12-28 15:43:48 -08:00
Dustin Carlino
cd43d94196 Fix uber turn viewer -- the panel in the SimpleState wasn't being
displayed
2020-12-28 15:37:05 -08:00
Dustin Carlino
6ef09bcef5 Start a 15 min tool to find houses that have access to a user-specified set of needs. #393 2020-12-28 14:41:40 -08:00
Dustin Carlino
50ec6830c0 Batch API for all trip time lower bounds. #392 2020-12-28 13:40:44 -08:00
Dustin Carlino
adc2ac0fc6 Show unwalkable roads. #393
Many issues with this -- service roads highlighted when you deselect
shoulders, no real sidewalk data yet, highways light up -- but it's a
start.
2020-12-28 13:13:14 -08:00
Dustin Carlino
32a3159d19 Express AmenityType as a proper enum. 2020-12-28 12:18:29 -08:00
Dustin Carlino
e816b0d6fc 15 min: Preview matching businesses while hovering on the category. #393 2020-12-28 11:37:48 -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
e4448eea1b new release 2020-12-27 10:33:16 -08:00
Dustin Carlino
fdfa2dbe8c Bundle some of the widgetry SVG assets in directly, so other users don't need to copy part of the data/ directory. [rebuild] [release] 2020-12-26 21:31:51 -08:00
Dustin Carlino
f8ac0fc96b Remember the upzoned buildings, and add a button to clear the choices. #431 2020-12-26 20:10:17 -08:00