Opened 9 years ago
Closed 9 years ago
#12377 closed defect (fixed)
validator does not detect intersecting rings in multipolygon
Reported by: | cmuelle8 | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.02 |
Component: | Core validator | Version: | latest |
Keywords: | template_report multipolygon intersecting | Cc: |
Description
Find test case attached. Additionally, touching inner rings should be warned about, as this will lead to "boundary" segments of the area not bounding the area, i.e. segments that have "outside" on both sides and hence are not boundaries. This contradicts every reasonable understanding of what an area is.
The least common denominator is, that an area has an exact outline enclosing it (it does not matter if there are more than one patches, or even holes, for this). By declaring touching inner rings to be a valid part of multipolygons, we define outline parts that cannot be an outline to be a valid outline - which is, erm, complete nonsense.
Build-Date:2016-01-14 22:06:58 Revision:9449 Is-Local-Build:true Identification: JOSM/1.5 (9449 SVN de) Linux Ubuntu 15.10 Memory Usage: 630 MB / 1609 MB (113 MB allocated, but free) Java version: 1.8.0_66-internal-b17, Oracle Corporation, OpenJDK 64-Bit Server VM Dataset consistency test: No problems found Plugins: - PicLayer (31895) - RoadSigns (31895) - alignways (31895) - apache-commons (31895) - editgpx (31106) - imagery_offset_db (31895) - kendzi3d (1.0.189) - kendzi3d-jogl (41) - kendzi3d-resources (0.0.1) - log4j (31895) - openvisible (31106) - pbf (31772) - photo_geotagging (31895) - photoadjust (31963) - poly (31772) - print (31895) - reverter (31926) - turnlanes (31772) - turnrestrictions (31895) - utilsplugin2 (31895) - wikipedia (31917)
Attachments (4)
Change History (19)
by , 9 years ago
Attachment: | invalid-mp-not-detected-by-validator.osm added |
---|
follow-up: 6 comment:1 by , 9 years ago
Touching inner rings are a valid part of the multipolygon definition.
comment:2 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 by , 9 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
That was too early. The test case contains intersecting inner rings and that's clearly invalid.
follow-up: 7 comment:6 by , 9 years ago
Replying to stoecker:
Touching inner rings are a valid part of the multipolygon definition.
Earth is flat, a flat. And beauty is in the eye of the beholder.
comment:7 by , 9 years ago
by , 9 years ago
Attachment: | intersecting-touching-inner-rings-within-mp_undetected-by-validator.osm added |
---|
intersecting-touching-inner-rings-within-mp_undetected-by-validator.osm
by , 9 years ago
Attachment: | intersecting-touching-inner-rings-within-mp_assigned-wrong-error-group-by-validator.osm added |
---|
intersecting-touching-inner-rings-within-mp_assigned-wrong-error-group-by-validator.osm
comment:8 by , 9 years ago
I've added a couple more test cases to test a potential fix against.
They only differ in one respect: which of the inner rings contains the other.
We would expect that both cases are handled equally by the validator, but they are not:
- The first example is detected valid, no warnings or errors shown.
- The second, very similar example, suggests the role of the smaller inner ring to be 'outer'.
I do not, among others in the community, endorse MPs with touching inner rings. Ideally the people that want to have them should fix the validator to produce a usable classification themselves. This should be no problem, because "The [current] multipolygon definition [read:documentation] was designed, accepted and implemented in a long process." with "no vote [or friendly comments] required." ( Citations are taken from http://wiki.openstreetmap.org/wiki/Talk:Relation:multipolygon#Touching_inner_rings )
comment:13 by , 9 years ago
Thanks for your efforts, the code is very readable now.
However it still feels not right, to catch intersecting outer polygons using the MultipolygonBuilder,
but then test intersecting inner polygons in the validator.
comment:14 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Actually the validator has to check intersecting outer rings as well.
Even though the multipolygon builder (Strg+B) will refuse to create them, a valid MP may be invalidated by e.g. moving a node of a valid outer polygon into another outer polygon. The validator does not recognize this currently. We also need to include this case into unit test, it's very basic.
invalid-mp-not-detected-by-validator.osm