Modify

#20681 closed defect (fixed)

[Patch] Unnecessary tag area=yes not reported for waterway=riverbank

Reported by: zelonewolf@… Owned by: GerdP
Priority: minor Milestone: 21.10
Component: Core validator Version:
Keywords: Cc:

Description

The combination natural=water + area=yes reports an unnecessary tag error, because area=yes is not needed.

This warning should also be shown for waterway=riverbank + area=yes.

Attachments (2)

riverbank_area_yes.osm (1.4 KB) - added by zelonewolf@… 21 months ago.
Simple test case demonstrating the issue
20681.patch (837 bytes) - added by GerdP 14 months ago.

Download all attachments as: .zip

Change History (17)

Changed 21 months ago by zelonewolf@…

Attachment: riverbank_area_yes.osm added

Simple test case demonstrating the issue

comment:1 Changed 14 months ago by GerdP

Milestone: 21.10
Owner: changed from team to GerdP
Status: newassigned
Summary: Unnecessary tag area=yes not reported for waterway=riverbank[Patch] Unnecessary tag area=yes not reported for waterway=riverbank

This should fix it:

  • resources/data/validator/unnecessary.mapcss

     
    3030  fixRemove: "{2.key}";
    3131}
    3232
    33 /* #14256, #15664 */
     33/* #14256, #15664, #20681 */
    3434area:closed[highway=rest_area][area?],
    3535area:closed[highway=services][area?],
    3636area:closed[aeroway=aerodrome][area?],
     37way:closed[waterway=riverbank][area?],
    3738area:closed[aeroway=helipad][area?] {
    3839  throwWarning: tr("{0} is unnecessary for {1}", "{2.tag}", "{1.tag}");
    3940  group: tr("unnecessary tag");

comment:2 Changed 14 months ago by skyper

We have a general mapcss rule for area=* on MP-Relations, mean-while. Probably, all area could be changed to way up front.

comment:3 Changed 14 months ago by GerdP

Good catch. I didn't use way instead of area intentionally, I just started with a different block containing rule

way:closed[natural ][area?],

comment:4 Changed 14 months ago by GerdP

I just tried a multipolygon with natural=way + area=yes and there is no warning that area=yes is not necessary for multipolygons (also not without the patch). What's wrong?

Last edited 14 months ago by GerdP (previous) (diff)

comment:5 Changed 14 months ago by skyper

Do you have a selection, maybe only the way and not the relation?

* Warnings (2)
  * area on a relation (1)
  * Unknown property value - Value 'way' for key 'natural' is unknown, maybe 'bay' is meant? (1)
* Other (1)
  * No area style for multipolygon (1)
Last edited 14 months ago by skyper (previous) (diff)

comment:6 Changed 14 months ago by GerdP

no

comment:7 in reply to:  5 Changed 14 months ago by skyper

This it what I get with r18235 and without any download area with the relation selected:

Replying to skyper:

* Warnings (2)
  * area on a relation (1)
  * Unknown property value - Value 'way' for key 'natural' is unknown, maybe 'bay' is meant? (1)
* Other (1)
  * No area style for multipolygon (1)

comment:8 Changed 14 months ago by GerdP

Which test produces the area on a relation message? Maybe a local version?

comment:9 Changed 14 months ago by skyper

Nice try, no I made sure to disable all my local files and enable all core rules.

geometry.mapcss

Last edited 14 months ago by skyper (previous) (diff)

comment:10 Changed 14 months ago by GerdP

Oops, sorry, I meant natural=water + area=yes. I see the test

relation[area?] {
  throwWarning: tr("{0} on a relation", "{0.key}");
  fixRemove: "{0.key}";
}

but it doesn't seem to work for my example. Have to debug this ...

comment:11 Changed 14 months ago by skyper

natural=water + area=yes on MP relation:

* Warnings (1)
 * area on a relation (1)
* Other (1)
 * missing tag - natural=water without water (1)

comment:12 Changed 14 months ago by GerdP

OK, tried with tested before. Get the same result with r18235 now.

Changed 14 months ago by GerdP

Attachment: 20681.patch added

comment:13 Changed 14 months ago by Don-vip

Milestone: 21.1021.11

Milestone renamed

comment:14 Changed 14 months ago by GerdP

Milestone: 21.1121.10

comment:15 Changed 14 months ago by GerdP

Resolution: fixed
Status: assignedclosed

In 18271/josm:

fix #20681: Unnecessary tag area=yes not reported for waterway=riverbank

  • add check for waterway=riverbank
  • change filter area to way to avoid duplicate warnings for relations with area=yes

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain GerdP.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.