Bucket surface=laterite and surface=clay with mud/dirt/earth/ground#6204
Conversation
Neither value matched any branch in the surface tag handler's substring-match chain, so they fell through to has_surface_ = false and got a road-class-based default guess instead of any surface classification. Both now match the same kDirt branch as mud, which is the minimal fix; a finer-grained wet-surface-risk bucket (mud/ clay/laterite split from dirt/earth/ground) is a separate, bigger design question raised in the issue thread and left for later. Addresses the classification gap discussed in valhalla#6171; the broader wet-surface routing risk/warning discussion in that issue remains open.
chrstnbwnkl
left a comment
There was a problem hiding this comment.
This is better than assuming a paved surface of course! Thanks. Can you also update the taginfo.json?
| ## UNRELEASED | ||
| * **Removed** | ||
| * **Bug Fix** | ||
| * FIXED: `surface=laterite` and `surface=clay` fell through the graph parser's surface substring-match chain unclassified (`has_surface_ = false`) instead of being bucketed with `dirt`/`earth`/`ground`/`mud` [#6171](https://github.com/valhalla/valhalla/issues/6171) |
There was a problem hiding this comment.
let's keep it short here; also I'd move it to the enhancements section.
| * FIXED: `surface=laterite` and `surface=clay` fell through the graph parser's surface substring-match chain unclassified (`has_surface_ = false`) instead of being bucketed with `dirt`/`earth`/`ground`/`mud` [#6171](https://github.com/valhalla/valhalla/issues/6171) | |
| * ADDED: classify `surface=laterite` and `surface=clay` as `Surface::kDirt [#6171](https://github.com/valhalla/valhalla/issues/6171) |
Addresses review feedback on PR valhalla#6204.
|
Thanks, updated the CHANGELOG.md wording/section as suggested. On |
|
I'd like to see all values we support in the |
|
also, you'll need to run |
Reviewer requested running scripts/format.sh / pre-commit before further review.
Done. Committed.
That'd be valuable, would it be ok to do it as a separate follow-up PR though? |
yep, I agree! we can have claude do a scan of 10-20 taginfo.json at each PR. dogfood it until it's done in a few months. no urgency. but it'd be nice if we kept that maximally useful. |
|
re: taginfo.json, that's fine with me. I hadn't checked how we kept surface in there, so if it's already not on a per value basis, it shouldn't be this PR's scope to change that. One last thing: the changelog entries go at the bottom of the section, not at the top 😅 then it's good to merge! |
|
Fixed, moved the CHANGELOG entry to the bottom of the Enhancement section. Thanks for the review! |
Summary
Follows up on the classification gap I flagged in #6171:
surface=lateriteandsurface=claydon't match any branch in thesurfacetag handler's substring-match chain, so they fall through tohas_surface_ = falseand get a road-class-based default guess instead of any real surface classification.This PR is the minimal fix: both values now match the same branch as
mud/dirt/earth/ground→Surface::kDirt.A finer-grained bucket for the wet-condition-risk surfaces (
mud/clay/lateritesplit off from the merely-firmdirt/earth/ground) was also discussed in the issue thread, but that's a separate, bigger design question (touches costing weights, not just classification) and isn't part of this PR. Not waiting on that discussion to land this smaller, uncontroversial fix.Test plan
ParseWays.SurfaceLateriteAndClayintest/gurka/test_parse_osm.cc, assertinglaterite,clay, andmudall classify toSurface::kDirtspatialite-toolsin this environment); relying on CI to run the gurka suite