Modify

Opened 3 years ago

Closed 3 years ago

#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@… 3 years ago.
Simple test case demonstrating the issue
20681.patch (837 bytes ) - added by GerdP 3 years ago.

Download all attachments as: .zip

Change History (17)

by zelonewolf@…, 3 years ago

Attachment: riverbank_area_yes.osm added

Simple test case demonstrating the issue

comment:1 by GerdP, 3 years ago

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 by skyper, 3 years ago

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 by GerdP, 3 years ago

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 by GerdP, 3 years ago

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 3 years ago by GerdP (previous) (diff)

comment:5 by skyper, 3 years ago

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 3 years ago by skyper (previous) (diff)

comment:6 by GerdP, 3 years ago

no

in reply to:  5 comment:7 by skyper, 3 years ago

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 by GerdP, 3 years ago

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

comment:9 by skyper, 3 years ago

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

geometry.mapcss

Last edited 3 years ago by skyper (previous) (diff)

comment:10 by GerdP, 3 years ago

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 by skyper, 3 years ago

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 by GerdP, 3 years ago

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

by GerdP, 3 years ago

Attachment: 20681.patch added

comment:13 by Don-vip, 3 years ago

Milestone: 21.1021.11

Milestone renamed

comment:14 by GerdP, 3 years ago

Milestone: 21.1121.10

comment:15 by GerdP, 3 years ago

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. Next status will be 'reopened'.

Add Comment


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