Opened 3 weeks ago
Last modified 13 days ago
#25000 new defect
[PATCH] "area=yes is unnecessary for amenity" doesn't apply to benches, which can be tagged as areas or loops
| Reported by: | mistenman | Owned by: | team |
|---|---|---|---|
| Priority: | minor | Milestone: | 26.12 |
| Component: | Core validator | Version: | |
| Keywords: | validator amenity bench area closed unclosed tagging tags | Cc: |
Description
The "Unnecessary tags" validator ruleset emits a warning "area=yes is unnecessary for amenity" for way:closed[amenity][area?][!highway]. This doesn't make sense for amenity=benches, which can be mapped as closed non-area ways when they form a long continuous loop, or as closed area ways, when they're a large platform people can sit on. I suggest we exclude amenity=bench from this unnecessary tag warning, and add a new validator rule for way:closed[amenity=bench][area!=yes][area!=no] that warns "amenity=bench on a closed way is ambiguous. Specify area=yes for a seating platform area or area=no for a linear bench loop". I've attached a patch to this effect.
I can see amenity=bicycle_parking facing the same issue, but I think mapping them as closed non-area ways is uncommon.
Attachments (4)
Change History (15)
by , 3 weeks ago
| Attachment: | josm-bench-area.patch added |
|---|
comment:1 by , 3 weeks ago
| Milestone: | → 26.11 |
|---|
follow-up: 4 comment:2 by , 3 weeks ago
Thanks for the patch
Unfortunately, fixing validator is only solving half of the problems. The preset should be adjusted along side and first of all allow areas (closed ways) and a checkbox for area should be added. #23694 could be fixed along side as well.
skyper (who is denied to login (429)).
follow-up: 6 comment:3 by , 3 weeks ago
I see, then I'll adjust the preset and send patch v2 here within a few hours.
follow-up: 5 comment:4 by , 3 weeks ago
skyper (who is denied to login (429)).
Ooops. Login should not have been blocked (but it starts with log :-) Try again.
P.S. A newer browser will REALLY help! There are at least 5 later version of Firefox.
comment:5 by , 3 weeks ago
Replying to stoecker:
skyper (who is denied to login (429)).
Ooops. Login should not have been blocked (but it starts with log :-) Try again.
Thanks, works again.
P.S. A newer browser will REALLY help! There are at least 5 later version of Firefox.
Sorry, my browser is fully up to date. Do not trust the main version as debian adds a lot of patches to the lts version. The main version does not change but the trailing numbers are important. Anyway thanks for the tip, I will try to work around it.
comment:6 by , 3 weeks ago
Replying to mistenman:
I see, then I'll adjust the preset and send patch v2 here within a few hours.
Thanks for your understanding.
I believe josm is in the stabilization phase, atm, as a new stable release (milestone:26.09) will be released soon. So it will take a few days up to a week until new patches will be committed unless it is a hot fix for a regression.
After another glance at taginfo maybe direction=* (like advertising board) and checkboxes for lit and covered could be added as optional if the preset is updated.
follow-up: 8 comment:7 by , 3 weeks ago
Let's not delay any updates for the sake of bench presets.
Here's a list of the fields in the bench preset in patch v2:
backrest=[yes,no]armrest=[yes,no]bench:type=[seated,stand_up,block,lounger,platform,swing,log,dangle_bench]material=[concrete,metal,plastic,stone,wood]colour=[black,blue,brown,gray,green,orange,purple,red,silver,white,yellow,#CD853F]seats=[1,2,3,4,5,6,7,8,9,10]area=[yes,no]- Optional:
direction=[N,E,S,W,0,90,180,270]covered=[yes,no]lit=[yes,no]
The ones in the optional group are rarest by their usage, except for the even rarer bench:type and area, but I feel like those two are fundamental enough to not go into the optionals.
by , 3 weeks ago
| Attachment: | bench-preset-v2.patch added |
|---|
comment:8 by , 3 weeks ago
Thank you for the quick update.
No the release will not be delayed by this ticket. I just told you about it as there is currently no rush for this ticket and we have some days to work on the patch.
On little note about the validator rule: Often these rules are extended and it turned out that documenting the ticket number(s) directly in the comment above the rule is quite useful. So adding something like (#25000) at the end of the line would be nice.
I was surprised that no project is supporting bench:type according to taginfo, so far, which makes me wonder. There was a time when the :type extension was seen as problematic but I am not up to date. Personally, I would expect at least some pictures on the wiki for a tag describing the "design".
by , 3 weeks ago
| Attachment: | bench-validator-and-preset-v3.patch added |
|---|
Maybe I got too excited with bench:type. [Key:bench:type](https://wiki.openstreetmap.org/wiki/Key:bench:type) does have pictures of some types, but the use is so marginal that it does belong in the optionals.
comment:9 by , 3 weeks ago
Also, "#25000"! It didn't really dawn on me. That's a big ticket count milestone. Though, the amount of solved tickets is probably what you'd rather be tracking.
comment:11 by , 2 weeks ago
A yes, I should have read the whole page. There are pictures on osmwiki:key:bench:type and under Comparison the problems with *:type and possible duplicity with simple bench=* are mentioned. So I am still hesitating, between, "well we do rarely update presets and once it is done, we should add as most as possible" and "this tag compared to many other missing tags is not settled, yet, and has rather low numbers".
Replying to mistenman:
Also, "#25000"! It didn't really dawn on me. That's a big ticket count milestone. Though, the amount of solved tickets is probably what you'd rather be tracking.
Well it first of all depends on your view on numbers why not #22222 or #24842 or #21212 or #23456. Though actually the ticket numbers are not that important and as you can see most of the mentioned ones are rather "simple" or duplicates. Probably the revision number is more important but yet again the revision with a pretty number might not be a big milestone but just a fix of a typo.
by , 13 days ago
| Attachment: | bench-validator-and-preset-v4.patch added |
|---|
Well, anyway, here's the patch with bench:type firmly in the bottom of the optionals now :) I wonder if these would ever be actually used by a data consumer, but such is the life of micromappers.



Adds new rule to
geometry.mapcssforway:closed[amenity=bench][area!=yes][area!=no]and exludesamenity=benchfrom theway:closed[amenity][area?][!highway]warning inunnecessary.mapcss