#22102 closed enhancement (fixed)
Add a warning if surface does not match tracktype for highway=track with tracktype=grade2 till grade5 [PATCH]
Reported by: | mcliquid | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 22.07 |
Component: | Core validator | Version: | latest |
Keywords: | template_report highway track tracktype grade surface asphalt gravel | Cc: |
Description
Inspired from this issue: https://github.com/osm-fr/osmose-backend/issues/1468
And some more context here: https://github.com/streetcomplete/StreetComplete/discussions/4063
What steps will reproduce the problem?
- Create a new way in JOSM.
- Add highway=track, surface=asphalt and tracktype=grade3
- Try to upload
What is the expected result?
JOSM should warn that the tracktype does not match the surface as it happens when you upload surface=sand with tracktype=grade1.
What happens instead?
No error / warning is shown
Proposed solution
Something like this:
Add
way[tracktype][surface][tracktype=~/grade[2-5]/][surface!=grass_paver]!.unpaved_surface
here: https://josm.openstreetmap.de/browser/josm/trunk/resources/data/validator/combinations.mapcss#L328
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2022-05-29 21:53:52 +0200 (Sun, 29 May 2022) Revision:18463 Build-Date:2022-05-30 01:30:57 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18463 de)
Attachments (2)
Change History (16)
comment:2 by , 3 years ago
Comment above is mine.
Is it ok to assume that every single one is wrong? Is it possible to have asphalt damaged and broken to the point being grade3 and not being better represented as gravel, but still as surface=asphalt
?
I think that is impossible and every single surface=asphalt tracktype=grade3
is wrong, but it is a potential failure mode.
What about surface=asphalt tracktype=grade2
or surface=concrete tracktype=grade2
? Here I am less sure.
comment:3 by , 3 years ago
@mkoniecz I can only assume from myself and look forward to more opinions :)
I looked at the proposal(1) as well as the discussion page(2) for tracktype and learned from that that the tracktype or more specifically the "grade" stands for the physical, structural condition of the track.
As far as I understand it, a grade1 is always a sealed, concreted and paved surface and cannot be something unpaved. I don't know if the translation fits, but in german we would say "water closed surface" or something like that. In my understanding from the wiki, an asphalt surface which is so destroyed that one would assume grade3 would be neither surface=asphalt anymore nor "tracktype=grade1".
An extremely damaged and broken asphalt road would probably also be better described with smoothness
.
There can always be exceptions, so it is with many OSM validators (in JOSM or Osmose) that will then be a false-positive, but the clear majority will be an error.
Do you have a picture of a situation that you would describe / tag as surface=asphalt tracktype=grade2
or surface=concrete tracktype=grade2
?
Or the other way around: surface=gravel tracktype=grade1
?
(1): https://wiki.openstreetmap.org/wiki/Proposed_features/grade1-5
(2): https://wiki.openstreetmap.org/wiki/Talk:Key:tracktype
comment:4 by , 3 years ago
Keywords: | highway track tracktype grade surface asphalt gravel added |
---|
comment:5 by , 3 years ago
surface=gravel tracktype=grade1
this one is impossible, though I have seen surface=compacted tracktype=grade2
surface=asphalt tracktype=grade2
: https://www.zinfo.pl/artykuly/12654 https://pl.freepik.com/premium-zdjecie/zniszczona-nawierzchnia-asfaltowa_5873014.htm https://pl.dreamstime.com/p%C4%99kni%C4%99ty-zniszczony-asfalt-na-drodze-t%C5%82o-image187016490
comment:6 by , 3 years ago
https://overpass-turbo.eu/s/1jfh - detector of some case, which I would consider to be always wrong
follow-up: 8 comment:7 by , 3 years ago
my proposed code:
way[surface=~/^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$/] { set fully_paved_surface; }
replace
way[tracktype=grade2][surface][surface=~/^(sand|mud)$/],
with
way[tracktype=grade2][surface][surface=~/^(sand|mud|ground|earth|dirt|grass|ice|salt|snow|woodchips)$/],
Add
way[tracktype=grade4][surface].fully_paved_surface, way[tracktype=grade5][surface].fully_paved_surface,
comment:8 by , 3 years ago
Replying to mkoniecz:
surface=gravel tracktype=grade1
this one is impossible, though I have seensurface=compacted tracktype=grade2
I don't see surface=compacted tracktype=grade2
as a problem at all, since it is also listed as "unpaved" surface in the [wiki]https://wiki.openstreetmap.org/wiki/Key:surface#Values So compacted is always grade2 or worse.
Replying to mkoniecz:
surface=asphalt tracktype=grade2
: https://www.zinfo.pl/artykuly/12654 https://pl.freepik.com/premium-zdjecie/zniszczona-nawierzchnia-asfaltowa_5873014.htm https://pl.dreamstime.com/p%C4%99kni%C4%99ty-zniszczony-asfalt-na-drodze-t%C5%82o-image187016490
Personally, I don't find the image details very supportive, because only a small part of the road is shown, which is damaged. Especially in the first picture you can see that after the damage the road continues solid again.
In my layman understanding this wouldn't be a reason to choose grade2, but much more to classify the subjective quality with the smoothness-tag. Even if a road has a large pothole, it is not unpaved / not solid for the entire section.
Replying to mkoniecz:
https://overpass-turbo.eu/s/1jfh - detector of some case, which I would consider to be always wrong
I understand your approach to find the most obvious errors, but I would still vote for adding "grade2" to your overpass query in line 12.
(As well as possibly adding "sett" to line 12?).
Replying to mkoniecz:
my proposed code:
way[surface=~/^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$/] { set fully_paved_surface; }replace
way[tracktype=grade2][surface][surface=~/^(sand|mud)$/],
with
way[tracktype=grade2][surface][surface=~/^(sand|mud|ground|earth|dirt|grass|ice|salt|snow|woodchips)$/],
Add
way[tracktype=grade4][surface].fully_paved_surface, way[tracktype=grade5][surface].fully_paved_surface,
The change would then allow someone to edit a track with surface=asphalt
and tracktype=grade3
.
I would really prefer if we could also add tracktype=grade2
and tracktype=grade3
in your last section of code.
Thank you so much!
comment:9 by , 3 years ago
BTW, see https://github.com/streetcomplete/StreetComplete/pull/4105 for equivalent in StreetComplete
Personally, I don't find the image details very supportive, because only a small part of the road is shown, which is damaged. Especially in the first picture you can see that after the damage the road continues solid again.
I have seen where entire road was in such crumbled asphalt state (though note that your reason is not against including such checks - but to make them even more aggressive)
I understand your approach to find the most obvious errors
Yes, my target here is to find what I consider obvious and blatant mistakes - and hopefully mappers in general will consider them to be clear mistakes
I would really prefer if we could also add tracktype=grade2 and tracktype=grade3 in your last section of code.
I would not protest against tracktype=grade3
- but I am dubious about grade2
by , 3 years ago
Attachment: | 0001-complain-about-more-incompatible-surface-and-tractyp.patch added |
---|
comment:10 by , 3 years ago
Summary: | Add a warning if surface does not match tracktype for highway=track with tracktype=grade2 till grade5 → Add a warning if surface does not match tracktype for highway=track with tracktype=grade2 till grade5 [PATCH] |
---|
comment:12 by , 3 years ago
Just ping it. I've taken a quick look at the patch, and it makes sense to me. Assuming I didn't miss something in the wiki.
EDIT: I'll merge it tomorrow -- I'm waiting just in case there is a problem not yet reported with the latest stable.
comment:14 by , 3 years ago
Milestone: | → 22.07 |
---|
It would extend #17592 and #17594