Commit Graph

542 Commits

Author SHA1 Message Date
Dustin Carlino
91ccd29f6d On wide or narrow sidewalks, draw pedestrians at the edges -- stop
hardcoding a sidewalk thickness
2022-04-24 09:55:24 +01:00
Michael Kirk
d76bb3fbbd update to geo 0.20.1 2022-04-22 18:13:36 +01:00
Dustin Carlino
b64874b92c Simplify the intersection geometry interface, which also simplifies the implementation a bit. #893 2022-04-22 14:58:37 +01:00
Dustin Carlino
e66cb88c5d Rearrange intersection geometry code and start goldenfile tests to pick up changes. #846 2022-04-18 08:48:07 +01:00
Dustin Carlino
1c05a99969 Try tracing paths more precisely along road edges, even with changing widths. Use in the experimental bus tool. It needs work, but solid start. 2022-04-04 19:12:00 +01:00
James Nebeker
891ea04e90
Issue 173 (#885)
* implemented logic to invert a polyline based on the quadrant of the polyline's angle

* Fixes for PR #885 on Issue #173.

* Reverted changes to render_curvey

Because of borrow checker limitations, I reverted the changes to the way
we call render_curvey. It is now called twice, depending on whether the
road is curved or straight. I also enclosed the implementation in an
ALWAYS-FALSE if else statement in order to deactivate it until some
remaining issues with text label rendering are resolved.

* Fix formatting

Co-authored-by: jamesneb <jnebeker@truckitapp.com>
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2022-03-25 06:23:06 -07:00
Dustin Carlino
9c0aedb575 When we can help it, don't shift road polylines twice. #860 2022-02-23 18:46:42 +00:00
Dustin Carlino
d141a2a810 Upgrade all geo dependencies! No behavioral difference 2022-02-22 16:45:49 +00:00
Dustin Carlino
c750493f38 Avoid crashes with PolyLine shifting. #860 2022-02-17 14:19:38 +00:00
Dustin Carlino
9054666a0b Use RDP simplification to road center-lines when we glue them together after collapsing degenerate intersections. This is a followup to #833.
And clean up some other things that RDP does better.

Fallout from regenerating everything:

- Enfield borough crashed, so removed it
- All UK scenarios are now much bigger, due to the changes in #853 being
  picked up
- Poundbury gridlocks now due to that
2022-02-10 14:40:11 +00:00
Dustin Carlino
37404044e3 Avoid crashing in PolyLine::dist_along due to floating point issues.
This was happening when trying to draw pedestrians sometimes.

Regenerate everything. Some maps/scenarios affected, but in tiny
imperceptible ways. No screenshot diff.
2022-01-24 20:47:02 +00:00
Dustin Carlino
bc97ed2d3a Prototyping Andy's idea for a dataviz to compare traffic counts
before/after. Road width is based on the baseline count, color is based
on the relative difference.

Lots of work needed, but this is probably a good way forward
2022-01-23 09:37:45 +00:00
Dustin Carlino
a14d6b3810 Better errors when core Line stuff breaks.
... and plumbing it everywhere
2022-01-18 10:26:33 +00:00
Dustin Carlino
bd340a1970 Switch from std::fs to fs_err. When files aren't found, the error message actually includes the path! 2022-01-17 17:30:51 +00:00
Dustin Carlino
3cf846f870 Include LTN cells in the geojson export. Very slow, but working,
implementation
2022-01-13 17:52:56 +00:00
Dustin Carlino
7d4a377173 Draw cell borders in different styles -- kind of necessary with the only-one-border schemes. 2022-01-12 13:07:35 +00:00
Dustin Carlino
8ff4c41ea1 Some useful debugging / correctness steps towards more robust blockfinding. [rebuild] [release]
I have another branch that handles roads without sidewalks on one side
-- it helps in some cases, but regresses in others, so not merging it
yet. But taking a smaller step and bringing in some stricter common
endpoint logic from there.

Bringing in some useful intermediate changes
2022-01-09 11:07:10 +00:00
Dustin Carlino
e1d0604718 Reduce the number of points along curvy roads. When they're tagged in OSM too close together, it explodes PolyLine shifting. #833 2022-01-06 17:27:10 +00:00
Dustin Carlino
e1d88f10ad Detect bad intersection polygons 2022-01-06 11:08:22 +00:00
Dustin Carlino
2356cee1db When tracing perimeters, allow doubling back at a dead-end with exactly
1 lane (usually a cycleway or footway). This correctly produces a few
more blocks in some maps -- as the goldenfile diff (and manual
verificaton) shows!

Also allow jumping from LTN browse to debug mode, to conveniently work
on blockfinding problems.
2022-01-06 10:16:11 +00:00
Marcel Dejean
68c5d43dd4 make turn marking arrows curvy 2021-12-23 17:00:08 +00:00
Marcel Dejean
755c513b9f kill find_pts_between and simplify make_shared_sidewalk_corner 2021-12-20 23:11:36 +00:00
Dustin Carlino
f0a1110d04 Draw planters when zoomed in. Icon by Trang 2021-12-17 13:31:49 +00:00
Dustin Carlino
b45bf869b7 Populating the map_model transit representation from the raw GTFS data. #372 2021-12-07 03:10:38 -08:00
Dustin Carlino
98e0a56120 Extract some GTFS data and put it in RawMap. #372 2021-12-07 03:10:38 -08:00
Dustin Carlino
7f71333513 Name osmosis boundaries using geojson properties. #794 2021-11-27 20:34:14 -08:00
Dustin Carlino
00df96f173
Render A/B Street's lanes and traffic simulation on top of Mapbox GL (#788)
[rebuild] [release]
2021-10-31 13:52:58 -07:00
Dustin Carlino
32fc46831b Draw arrows to show entrances/exits to a LTN.
(and rename Line::reverse for consistency with PolyLine)
2021-10-29 12:25:30 -07:00
Dustin Carlino
a2d7beb508 Make block outlines trace around dead-ends 2021-10-28 14:22:07 -07:00
Dustin Carlino
ef6942f83e Improvements to block geometry:
- always use proper road edge
- trace along the boundary of intersection polygons
2021-10-28 12:45:27 -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
66c908913e Run the area polygons in city.bin through the georust simplification.
Seattle drops from 3MB to 800KB with no discernable loss of quality.
2021-10-14 10:37:32 -07:00
Michael Kirk
476f19142f
Consistent panel width (#772)
* reorder tabs: plan trip before adding lanes

This order of tasks should be more logical for most people.

* Copy tweaks

"trip" is better than "route" since you don't pick the route, only the
start/end points. The route is inferred based on the available roads.

* Smaller elevation plot

it was much wider than any other UI element, meaning the column
dramatically jumps sizes when switching to this tab.

* better align line-plot x-axis

* Avoid jittering UI while switching through tabs.

* fixup! Avoid jittering UI while switching through tabs.

* fixup! Copy tweaks

* fixup! reorder tabs: plan trip before adding lanes

* fixup! Copy tweaks
2021-10-11 15:02:41 -07:00
Dustin Carlino
4ae3a1076f Show comparison stats in the alternate route's tooltip. #743 2021-09-28 09:40:45 -07:00
Dustin Carlino
c4d38ca591 A humble start to showing an alternate, low-stress route. #743 2021-09-27 13:13:11 -07:00
Gedalia Kott
d833f82c73 Fix Issue #692:settings for metric VS imperial distance units are repsected for distance 2021-09-18 14:06:32 -07:00
Dustin Carlino
190eaef251 Swap a femur with a tibia. A questionable trade, but I'm calling it
progress.
2021-08-05 18:51:19 -07:00
Dustin Carlino
c71c1b91dc Trying to fix corner curbs and failing, but made some maybe useful geom
API additions.

And not drawing curbs for footways. #715
2021-07-31 19:46:37 -07:00
Dustin Carlino
a4906a2953 More flag-guarded color scheme progress towards #715:
- choosing some building colors
- proper unzoomed road/intersection outlines
- adjusting curb color based on road rank (for arterials, it was the
  same grey!)
2021-07-28 12:12:01 -07:00
Dustin Carlino
835e4bf7a7 Iterate on the curb rendering for #715. A simple start to it already happens to exist for an old color scheme experiment.
Still some issues with shoulders, but improved in many cases.
2021-07-25 13:08:14 -07:00
Dustin Carlino
7399f2aff2 Prettyprint durations with one decimal place, not two. Loading screens are a little too intense otherwise. This was changed in #699 because the variable name was wrong. 2021-07-25 10:53:57 -07:00
Dustin Carlino
0bce76e172 Parallelize commuter pattern calculation, to speed up the new concave hull algorithm on native 2021-07-25 10:20:27 -07:00
Michael Kirk
760d75e12a
Use concave hull for neighborhoods (#716)
Also, for sidewalks, interpolate points every n-meters to get a better
concave hull.
2021-07-25 10:11:12 -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
Michael Kirk
5ab8109f3b add tests, fix remainder rounding in parts 2021-07-13 22:51:18 -07:00
Michael Kirk
7bf3f03251 add y-axis to aggregate duration table 2021-07-13 22:51:18 -07:00
Michael Kirk
43a3f2cdc2 round duration strings to largest unit 2021-07-13 22:51:18 -07:00
Michael Kirk
78a840edfa return Duration not mins 2021-07-13 22:51:18 -07:00
Dustin Carlino
66be29d752 Import a new city using Overpass, instead of Geofabrik + clipping. #523
The returned XML seems to be missing lots of stuff, but it's much faster
and wasn't hard to wire up. I'll look into fixing the query...
2021-07-12 14:06:54 -07:00
Dustin Carlino
da704b4546 Extend the parking thought bubbles to handle people climbing steep hills.
(And some clippy fixes)
2021-07-10 17:14:10 -07:00