Modify

Opened 14 months ago

Last modified 5 months ago

#20663 assigned defect

[patch] Area style on outer way not flagged when different river area taggings are combined

Reported by: zelonewolf@… Owned by: GerdP
Priority: normal Milestone:
Component: Core validator Version: latest
Keywords: Cc: skyper, Klumbumbus

Description

This issue is present as of JOSM version 17653.
I am attaching a simple test case to demonstrate the issue.

When an "area" multipolygon contains a closed way outer member that is also an area, the validator should flag the warning "Area style on outer way". However, this does not seem to be occurring under the following combinations:
1) The multipolygon is tagged waterway=riverbank and the member is tagged natural=water+water=river
2) The multipolygon is tagged natural=water+water=river and the member is tagged waterway=riverbank

The test case shows That the validator completely ignores these incorrect cases while correctly detecting issues in cases where both the outer member and parent multipolygon are both using the same river area style.

Attachments (4)

inconsistent_river_riverbank.osm (6.0 KB) - added by zelonewolf@… 14 months ago.
Simple test case demonstrating the issue
20663.patch (4.2 KB) - added by GerdP 8 months ago.
always show warning when outer way has area style, adapt unit test data
20663-2.patch (9.3 KB) - added by GerdP 7 months ago.
reverts also the changes from r17501
josm_mp_mismatch_area.osm.xz (744 bytes) - added by skyper 7 months ago.
example with MP mismatching area

Download all attachments as: .zip

Change History (16)

Changed 14 months ago by zelonewolf@…

Simple test case demonstrating the issue

comment:1 Changed 8 months ago by GerdP

The code in MultipolygonTest checks if the mappaint style on the outer way is similar to that of the multipolygon. If yes, the informational message With the currently used mappaint style the style for outer way mismatches the area style is produced, if not, the warning Area style on outer way is produced.
This explains the special behaviour.
It's probably better to always show the warning Area style on outer way and simply remove the code for the other message.

Changed 8 months ago by GerdP

Attachment: 20663.patch added

always show warning when outer way has area style, adapt unit test data

comment:2 Changed 8 months ago by GerdP

Milestone: 21.10
Owner: changed from team to GerdP
Status: newassigned
Summary: Area style on outer way not flagged when different river area taggings are combined[patch] Area style on outer way not flagged when different river area taggings are combined

comment:3 Changed 8 months ago by GerdP

Hm, with this patch JOSM sometimes produces two warnings for a multipolygon where the outer way has the same tag as the relation. Tried the test file for #20473 and got

Area style on outer way (1)
Multipolygon outer way repeats major tag of relation - Same tag:'leisure'='water_park' (1)

comment:4 Changed 7 months ago by Don-vip

Milestone: 21.1021.11

Milestone renamed

comment:5 Changed 7 months ago by GerdP

Not sure what to do here. Should I remove the test from TagChecker which creates the 2nd message?
Are there really no cases where a closed outer way in a multipolygon is allowed to have an "area style"? If yes there is no need for the detailed check in TagChecker and I can revert r17501.

comment:6 Changed 7 months ago by GerdP

Cc: skyper klumbumbus added

comment:7 Changed 7 months ago by GerdP

Cc: Klumbumbus added; klumbumbus removed

Changed 7 months ago by GerdP

Attachment: 20663-2.patch added

reverts also the changes from r17501

comment:8 Changed 7 months ago by skyper

The warning about style is an internal warning. Yes, as I can use areas in multiple MP-Relations as outer and still define the closed way with more specific tags it is possible that the style in use mismatches the area style. I think the current warnings are sometimes too strict.

comment:9 Changed 7 months ago by GerdP

Hm, maybe I should stick to the first patch.
The test in TagChecker only complains when the tags are equal, either with
Multipolygon outer way repeats major tag of relation or with
Multipolygon outer way repeats tag of relation.
So, it is about a different issue.
In what situation do you see too strict warnings? With different mappaint styles?
I could use the code in TagChecker to produce a better message. E.g. instead of Area style on outer way we may report
in group Multipolygon outer way has area tag the message area tag on outer way:''{0}''=''{1}''

Changed 7 months ago by skyper

example with MP mismatching area

comment:10 Changed 7 months ago by skyper

+1, for better warnings

Think we have a discussion about Mappaint style warning (rewording) on another ticket, too. Actually, I do not use other styles defining areas, so I have never tested without default style.

The strictness might be ok, but why can I silence this warning by using MPs? In my example I get the warning but if I change the outer way into another MP I get no warning. Is this intended?

Another question is, if we have these mappaint style warnings as own category or if we use the style in other warnings and silence one in favor of the other. I prefer a cleaner cut and have other validator warnings not rely on the style.

Coming back to this report, we have a special case with two tagging systems (riverbank <=> water) which might need special treatment.

comment:11 Changed 5 months ago by Don-vip

Milestone: 21.1121.12

Milestone renamed

comment:12 Changed 5 months ago by Don-vip

Milestone: 21.12

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain GerdP.
as The resolution will be set.
to The owner will be changed from GerdP to the specified user.
The owner will change to zelonewolf@gmail.com
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket

Add Comment


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

 
Note: See TracTickets for help on using tickets.