Opened 5 years ago
Last modified 5 years ago
#19148 new defect
Problems with multipolygon consisting of several separate areas with same primary tag but different secondary tags.
Reported by: | skyper | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | template_report multipolygon | Cc: |
Description (last modified by )
This came up in #19136, see my comment 22 and followups.
I've created an example file:
josm_19136_multi_with_same_style_sample.osm
If I have two parts of a forest with a name in common but the parts have different operator
and different leaf_type
. I need to leave the secondary tags on the parts and maybe use more general values for the multipolygon.
- Only secondary tags on a area without primary tag is not working
- "Create multipolygon" just does that
- Simply adding the name to both parts contradicts: One feature one object
- Only a cheat, creating multipolygons for each area and an additional one for the group is accepted by validator
- I do not use
type=site
as osmwiki:Tag:type=site explicitly stats:This relation is not to be used in cases where the element can be represented by one or more areas and neither linear ways nor nodes outside these areas would have to be included or excluded from within these areas.
Multi_Multi (no warning)
Same as "Valid but warning" but with multipolygons for each part. I get no warning.
- Should trigger the same warnings as "Valid but warning" cause it is just a different mapping style
- Additional warnings for the "forest" multipolygons without
name
as are not needed with only oneouter
without any primary tags
Wood vs Forest
I get With the currently used mappaint style the style for outer way mismatches the area style (2)
wood
andforest
should be treated as synonyms, e.g. no warning
Valid but warning
I get Area style on outer way (2)
- Right, but not worse a warning as this is a valid case
Incorrect
I get no warning. This is the result of "create multipolygon". Use the two areas on the right side.
- Both areas do not have a primary tag, needs a warning:
Object with only secondary tags
"Create multipolygon"
I get no info if not all tags from outer
are moved to the relation`
- I expect a warning if this is not possible
- Moving only the primary tag and leaving only secondary tags on the areas does not solve the problem.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-04-23 21:58:14 +0200 (Thu, 23 Apr 2020) Revision:16376 Build-Date:2020-04-24 01:30:45 URL:https://josm.openstreetmap.de/svn/trunk
Attachments (1)
Change History (13)
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
follow-up: 3 comment:2 by , 5 years ago
comment:3 by , 5 years ago
Replying to GerdP:
Please review the file. The relation with name="Multi_Multi (No warnings)" contains no special case, just two closed ways without further tags.
This is intended as example of the cheat to silent validator. It is the same as as "Valid but warning".
I replaced the file cause I had forgotten to remove the note=*
from the "forest" multipolygons without name
.
follow-up: 6 comment:4 by , 5 years ago
OK, please describe in detail what you get and what you expect to happen for each multipolygon in this file.
comment:5 by , 5 years ago
Description: | modified (diff) |
---|
comment:6 by , 5 years ago
Replying to GerdP:
OK, please describe in detail what you get and what you expect to happen for each multipolygon in this file.
I've adjusted the description. Sorry, probably no more time till Monday. Have a nice weekend.
comment:7 by , 5 years ago
Description: | modified (diff) |
---|
follow-up: 9 comment:8 by , 5 years ago
Have a nice weekend, too.
name="Multi_Multi (No warnings)"
is a correct and very simple multipolygon, only the description and the name are confusing. I see no complex cheat here. Not related to the subject.- The two
description=Useless multipolygon with only one outer
are correct, just overly complex. Not related to the subject, but might be worth to warn about this case. name="Valid but warnings"
is suspicous.IMHO it is an old-style multipolygon.- the
name=Wood vs Forest
is not a problem, thus not related to the subject. - the
name=Incorrect
looks correct to me. JOSM doesn't complain and I wonder why you think that the outer ring of multipolygon must have a "primary" tag.My understanding is that must not have a primary tag. That would be an old style multipolygon.It can have a primary tag. Typical usage: closed way with natural=coastline is outer in a natural=bare_rock MP having a single member.
comment:9 by , 5 years ago
Replying to GerdP:
name="Multi_Multi (No warnings)"
is a correct and very simple multipolygon, only the description and the name are confusing. I see no complex cheat here. Not related to the subject.- The two
description=Useless multipolygon with only one outer
are correct, just overly complex. Not related to the subject, but might be worth to warn about this case.
In my eyes, this first two are one case, where I demonstrated what you can do to get rid of the warnings. Everything is mapped correctly but way too complex. As already written, this should be the same as name="Valid but warnings"
and be treated similar or equal.
- the
name=Wood vs Forest
is not a problem, thus not related to the subject.
Right, this is a special case but shows the problems with the mapcss and styles. In my opinion, I would make much more sense to check the tags instead of the style which, by the way, would lead to a more general and better understandable warning.
name="Valid but warnings"
is suspicious.IMHO it is an old-style multipolygon.- the
name=Incorrect
looks correct to me. JOSM doesn't complain and I wonder why you think that the outer ring of multipolygon must have a "primary" tag.My understanding is that must not have a primary tag. That would be an old style multipolygon.It can have a primary tag. Typical usage: closed way with natural=coastline is outer in a natural=bare_rock MP having a single member.
For these two case:
- Let's go one step back. Both parts are forests with different
operator
andleaf_type
but no individualname
. The multipolygon adding thename
and combining the two parts to one objects is just a higher level. Both parts are still valid as individual objects but not without a primary tag. Inheriting the primary tag from multipolygons might work but not if the parts areouter
members of more than one multipolygon with different primary tags. - Let's go one step further and try to add a lake inside one of the parts. I need to create a multipolygon for that part similar to
description=Useless multipolygon with only one outer
inname="Multi_Multi (No warnings)"
, though, this time with an additionalinner
and needed (not useless). That only works with a primary tag on that part and "create multipolygon" will fail.
In general, I think there should be no problem if the outer
parts and the multipolygon have the same primary tag but we have a problem if there is more than one primary tag on any object as we do not know to which primary tags the secondary tags belong to.
comment:10 by , 5 years ago
OK, I think I understand now what the multi-multi stuff means.
That only works with a primary tag on that part and "create multipolygon" will fail.
I can create a multipolygon with a lake (using Ctrl+B), and I don't get warnings.
We have different opinions about the correctness of these MP. Was it discussed in the tagging list or in the German forum?
follow-up: 12 comment:11 by , 5 years ago
Small side note:
As always this is a complex topic. Very likely multipolygons where the outer ways have different styles than the polygon will cause trouble. If if not forbidden it should not be encouraged.
OSM has no real concept of different area layers, so at least on drawing such constructs will very likely fail in many cases.
Getting rid of the old (and very-old) style polygons made the concept less complex on a technical level, but not really on the usage side :-)
by , 5 years ago
Attachment: | josm_19148_multi_with_same_style_sample2.osm added |
---|
extract of first example with inner lakes
comment:12 by , 5 years ago
Replying to GerdP:
That only works with a primary tag on that part and "create multipolygon" will fail.
I can create a multipolygon with a lake (using Ctrl+B), and I don't get warnings.
It will fail in the cases, where no primary tag is on the outside ring as it creates a multipolygon with only secondary tags, e.g. the action works but will not create a multipolygon with the correct primary tag. I've added josm_19148_multi_with_same_style_sample2.osm. Simply create a MP for the parts with the lakes and look at the results.
We have different opinions about the correctness of these MP.
Not on the MP but how to handle the case where we have the same primary but different secondary tags on the outer polygons. Or in cases with mutiple outer
memberships.
Was it discussed in the tagging list or in the German forum?
I don't know. The times, when tagging@ had an major impact on the development/evolution on tags and their usage, have past years ago, and I got tired of discussing things over and over again on several places.
Replying to stoecker:
As always this is a complex topic. Very likely multipolygons where the outer ways have different styles than the polygon will cause trouble.
Even with the same style, JOSM does render different texts at the same position if both the outer polygon and the MP have a primary tag or even if the inner
with name
is in the center of a polygon, see josm_19148_multi_with_same_style_sample2.osm.
If if not forbidden it should not be encouraged.
I fully agree, but how to handle cases with different secondary tags? Should I always use the complex example which simply moves the levels on the different MPs to get rid of the warnings but does not help at all to solve the problem.
OSM has no real concept of different area layers, so at least on drawing such constructs will very likely fail in many cases.
So, that is where we have to start development. Using site
is discouraged and not supported by many applications but could help.
Please review the file. The relation with name="Multi_Multi (No warnings)" contains no special case, just two closed ways without further tags.