Modify

Opened 8 months ago

Closed 6 weeks ago

#19526 closed defect (fixed)

Multipolygon validation failures

Reported by: pch14@… Owned by: pch14@…
Priority: normal Milestone: 20.07
Component: Core validator Version:
Keywords: Cc:

Description

Two cases, where validation does not catch errors in multipolygons from uploading.
Screenshots and OSM file to be attached.

1) Move a node from an inner ring outside of the outer ring
2) Make a section of the inner ring also part of the outer ring

Both times, trying to upload will not display a warning or an error.
Neither will starting validation do so, when nothing is selected at all.

The Error will only show, when starting validation and the relation itself selected.
In case two, this only after having downloaded the missing members thereof.

The error messages differ
1) Intersection between multipolygon ways
2) Multipolygon outer way shares segment with other ring

Attachments (4)

MP-validation.osm (63.7 KB) - added by pch14@… 8 months ago.
Quick start for testing MP validation
MP-validation-crossing.gif (26.8 KB) - added by pch14@… 8 months ago.
Case 1) Intersection
MP-validation-sharing.gif (57.3 KB) - added by pch14@… 8 months ago.
Case 2) Shared Segment
MP-single-io-node.osm (73.0 KB) - added by pch14@… 6 months ago.
Single node both inner/outer in MP

Download all attachments as: .zip

Change History (19)

Changed 8 months ago by pch14@…

Attachment: MP-validation.osm added

Quick start for testing MP validation

Changed 8 months ago by pch14@…

Attachment: MP-validation-crossing.gif added

Case 1) Intersection

Changed 8 months ago by pch14@…

Attachment: MP-validation-sharing.gif added

Case 2) Shared Segment

comment:1 Changed 8 months ago by GerdP

This is a general weakness of the validation that is done before upload. It only looks at modified objects, and the relation itself is not modified and thus it is not tested or uploaded.
The intersection is found when validator is run with empty selection, the shared segment is only detected when the members are complete. This could be improved.

comment:2 Changed 8 months ago by pch14@…

Funnily, it depends, on what was selected previously. The intersection e.g. is not detected with empty selection, when the new point is added, while the relation was selected last, which changes both the adjoined screes at the same time.

If the new point is only added to the northern scree there will also be a warning about "Overlapping identical Natural Areas". I understand, that this is quite tricky. Can there be a "dirty" flag for relations, that gets set, when a member is changed?

Fortunately, the error seems to be rare and geofabrik toolbox detects it and a busy kartler quickly repairs that :)

comment:3 in reply to:  2 ; Changed 8 months ago by GerdP

Replying to pch14@…:

Funnily, it depends, on what was selected previously. The intersection e.g. is not detected with empty selection, when the new point is added, while the relation was selected last, which changes both the adjoined screes at the same time.

If the new point is only added to the northern scree there will also be a warning about "Overlapping identical Natural Areas". I understand, that this is quite tricky. Can there be a "dirty" flag for relations, that gets set, when a member is changed?

I don't understand/believe the part regarding selections. If nothing is selected all elements are tested. If something is selected on the selected elements are tested, but some tests are smart enough to collect additional data needed to test the selection. The MultipolygonTest is not one of them.
You probably created different changes while testing.

Reg. the "dirty" flag: I agree that it would be good to validate also parent objects of changed elements on upload. Still, some tests would not work with incomplete data.

comment:4 in reply to:  3 Changed 8 months ago by pch14@…

Replying to GerdP:

I don't understand/believe the part regarding selections.

I meant that the new node in case 1 will be different, depending on what was selected at the time, that I pulled it from centre of line. But you are right, the error is reported, probably I just forgot to deselect the node.

Still, unlike validation with empty selection, upload validation does not catch the intersection. Shouldn't this be the same? Yet, as soon as the downloaded area has work size map content loaded, validation with empty selection reports lots of stuff, that mappers truly should not be bothered with. So generally, it is good, that its not the same.

PS: Perhaps case 2 is about ordering of the tests - If the "incomplete" test returns a warning, the "sharing" test does not run?

comment:5 Changed 8 months ago by GerdP

Yes, with the current code the "shared segment test" is skipped for incomplete multipolygons. I'll try to change that.

comment:6 Changed 8 months ago by GerdP

In 16761/josm:

see #19526: Multipolygon validation failures

  • find shared segments with outer ways when multipolygon relation is incomplete. Relies on the roles of the complete way members, an empty role is considered to be "outer".

comment:7 in reply to:  6 Changed 8 months ago by skyper

Replying to GerdP:

In 16761/josm:

see #19526: Multipolygon validation failures

  • find shared segments with outer ways when multipolygon relation is incomplete. Relies on the roles of the complete way members, an empty role is considered to be "outer".

Nice, see #19534 for the corresponding update request for route relations.

comment:8 Changed 8 months ago by pch14@…

If I understand fully, in the next release, shared segments will trigger an error even on incomplete multipolygons, when the validator is started with an empty selection. I understand further, that uploading tests will be more shallow, rightly so, yet therefore not show errors on intersections and shared segments of competing rings, as long as the relation itself was not modified.

In conclusion, this here actually is an "enhancement" type issue, like "Mark multipolygon relations for validation on upload, if members were modified"? From personal experience, having knocked some square kilometres of forest from the map, I see some value in that. In the mean time I will try to validate with empty selection before upload, so as to keep palms from getting sweaty ;)

comment:9 Changed 8 months ago by GerdP

The change in r16671 doesn't fix the general problems with the validation of selected or modified objects. It only fixes the problem mentioned in comment:5

comment:10 Changed 6 months ago by simon04

Component: CoreCore validator

Changed 6 months ago by pch14@…

Attachment: MP-single-io-node.osm added

Single node both inner/outer in MP

comment:11 Changed 6 months ago by pch14@…

Hello there, no idea if this applies here, I probably made another mistake, not sure, yet OSM Inspector-AREAS seems to think so; I noticed because it got corrected in https://www.openstreetmap.org/changeset/89906991 - in the lower a node of an inner pond touches with the outer area.
Attached osm file of state before correction "MP-single-io-node", no errors/warnings reported whatever I try

comment:12 in reply to:  11 Changed 6 months ago by anonymous

Replying to pch14@…:

Hello there, no idea if this applies here, I probably made another mistake, not sure, yet OSM Inspector-AREAS seems to think so

Hmm, Reading https://wiki.openstreetmap.org/wiki/Relation:multipolygon osmi is wrong on this, inner and outer polygons may touch at isolated nodes, it says - mapnik also could render just fine

comment:13 Changed 6 weeks ago by GerdP

Owner: changed from team to pch14@…
Status: newneedinfo

I think we can close this as fixed?

comment:14 Changed 6 weeks ago by pch14@…

You are welcome. Feel free to do so. At least a non trivial part is said to be fixed, and I believe that. The remaining, possible enhancement, might be better described in another issue anyways. I do not see the urge for even that, though.

comment:15 Changed 6 weeks ago by GerdP

Milestone: 20.07
Resolution: fixed
Status: needinfoclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain pch14@….
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.