Opened 4 years ago
Last modified 4 years ago
#21153 assigned defect
Split Object: Overlapping areas created
Reported by: | skyper | Owned by: | GerdP |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin utilsplugin2 | Version: | |
Keywords: | Split Object overlapping ways relations | Cc: | Woazboat |
Description (last modified by )
What steps will reproduce the problem?
- Have a closed way or a multipolygon relation
- Draw a new way between two nodes of the closed way completely outside of area, or in case of a relation with some parts outside, example file
- Select the new unclosed way (and the relation)
- Split Object
What is the expected result?
Either the split is denied or better add the outer part as a new closed way connected to the other closed way. For relations only add the former outer part to one relation
What happens instead?
A new closed way/relation is created as expected but additional the former outer part is added two both areas, resulting in overlapping areas.
Please provide any additional information below. Attach a screenshot if possible.
See #21154 for another problem with invalid result.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-07-21 20:57:29 +0200 (Wed, 21 Jul 2021) Revision:18079 Build-Date:2021-07-22 01:31:13 URL:https://josm.openstreetmap.de/svn/trunk Plugins: + utilsplugin2 (35792)
Attachments (4)
Change History (11)
comment:1 by , 4 years ago
Description: | modified (diff) |
---|
by , 4 years ago
Attachment: | josm_SplitObject_examples.osm added |
---|
comment:2 by , 4 years ago
Cc: | added |
---|---|
Description: | modified (diff) |
Keywords: | relations added |
Summary: | Split Object: Overlapping closed ways created → Split Object: Overlapping areas created |
Ah, relations have this problem, too.
follow-up: 4 comment:3 by , 4 years ago
Currently only TestErrors with severity ERROR are considered blocking for multipolygon splitting. This detects split ways that cross any multipolygon ring without connecting to it via a shared node (i.e. the 'self-crossing' example in the test files). Split ways that cross multipolygon rings with shared nodes (i.e. the 'only overlapping' example) are not detected because this is only considered a WARNING and not an error. This could be added as a special case here:
I'm not sure if there's an easy way to detect if a split way is completely outside of the area to split.
comment:4 by , 4 years ago
Replying to Woazboat:
I'm not sure if there's an easy way to detect if a split way is completely outside of the area to split.
Is it possible to check the opposite, e.g. is not inside, like the opposite of "All inside area" action? Only the end nodes but no middle node of the "split" way should be "inside" area.
comment:5 by , 4 years ago
I'm sure there is, I'm just not familiar enough with the JOSM source code to know how that could be done. #18295 is the first time I have worked on JOSM.
On another note, why are self-intersecting multipolygon rings treated as an error if they are crossing without a shared node, but only as a warning if there is a shared crossing node? Maybe the second case should also be promoted to an error. (Although I guess detecting the difference between a self-intersecting ring and different rings sharing a node is problematic as the interpretation can depend on the order of the relation members. Maybe only intersecting ways that don't start/end on an intersection node should be treated as errors since there is no way they could be reordered to form separate rings.)
by , 4 years ago
Attachment: | mp_self_intersecting.png added |
---|
Multiplygon with self-intersecting ways
by , 4 years ago
Attachment: | mp_shared_node.png added |
---|
The same multipolygon with members reordered to form separate rings with a shared node (but otherwise unchanged)
comment:6 by , 4 years ago
See also https://wiki.openstreetmap.org/wiki/Relation:multipolygon/Algorithm
JOSM doesn't implement the backtracking and I don't know how this could be done. There's a ticket about this but I cannot find it.
by , 4 years ago
Attachment: | bad-mp-split.osm added |
---|
another example that gives unexpected result when a multipolygon is split with a split way that is outside of the multipolygon
comment:7 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
With my example I also would expect a warning that the split way is outside of the multipolygon area.
A possible, rather simple check could be to compare the sizes of the covered areas before and after the split. They should not differ much.
example file