add `surface` sequence for final path in UI
- Dominant language
- C++
- Stars
- 6.2k
- Forks
- 981
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 14
Description
ref https://github.com/valhalla/valhalla/issues/6171
I was thinking it'd be nice for e.g. our web app (but all frontends really) to display a "surface" sequence so it's obvious which road surfaces one can expect (with a OSM wiki entry to those type infos, e.g. `laterite` et al should be made more obvious).
the main problem is that we default `surface` as our best (western) guess, e.g. most car roads default to `paved_smooth`. that's we get from our `trace_attributes` response (which I'd use for that). in other societies a `highway=primary` might not default to `paved_smooth`.
#### short-term proposal:
don't derive unless more generic, e.g. `use = track` leads to default `surface = dirt`, that's fine IMO. or
1. we're more radical and don't derive anything
2. and/or we add another field `surface_derived` which can respond with our best guess
so that for the vast majority of "unknown" surface tags we can be more honest and say `unknown`.
#### long-term proposal:
make more use of our db for these country-specific things (same as we already do for some things like driving side, where pedestrian/bikes are allowed etc). I'd actually like to really re-design that mechanism so it's easier to add defaults for other country-specific attributes. but that's TBD, needs investigation, I'm only half-clear how we do it today with sqlite.
wdyt @kevinkreiser @chrstnbwnkl @kinkard ?
Contributor guide
Research direction
Start at the trace_attributes response and inspect how surface defaults are currently produced, then trace the existing SQLite-backed country-specific defaults. Done depends on choosing and specifying the short-term behavior for unknown versus derived surfaces; the broader country-specific redesign remains investigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, sqlite
- Domain
- backend-api-design, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100