Modify ↓

Opened 40 hours ago

Last modified 10 hours 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.11
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 (2)

josm-bench-area.patch​ (1.4 KB ) - added by mistenman 40 hours ago.
Adds new rule to geometry.mapcss for way:closed[amenity=bench][area!=yes][area!=no] and exludes amenity=bench from the way:closed[amenity][area?][!highway] warning in unnecessary.mapcss
bench-preset-v2.patch​ (3.2 KB ) - added by mistenman 28 hours ago.

Download all attachments as: .zip

Change History (10)

by mistenman, 40 hours ago

Attachment: josm-bench-area.patch​ added

Adds new rule to geometry.mapcss for way:closed[amenity=bench][area!=yes][area!=no] and exludes amenity=bench from the way:closed[amenity][area?][!highway] warning in unnecessary.mapcss

comment:1 by stoecker, 38 hours ago

Milestone: → 26.11

comment:2 by anonymous, 35 hours 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)).

comment:3 by mistenman, 35 hours ago

I see, then I'll adjust the preset and send patch v2 here within a few hours.

in reply to:  2 ; comment:4 by stoecker, 35 hours 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.

in reply to:  4 comment:5 by skyper, 33 hours 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.

in reply to:  3 comment:6 by skyper, 32 hours 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.

comment:7 by mistenman, 28 hours 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 mistenman, 28 hours ago

Attachment: bench-preset-v2.patch​ added

in reply to:  7 comment:8 by skyper, 10 hours 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".

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to mistenman.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.