openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.37k stars 1.21k forks source link

Split the boundary and then delete the point. #3117

Open CAIsoul opened 8 years ago

CAIsoul commented 8 years ago

In "edit with iD", after I create a polygon, if I click a point and split the boundary into two, followed by deleting this point, the polygon would be broken into polylines even when there are enough polylines left to formulate a polygon.

bhousel commented 8 years ago

Is this what you mean?

split_area

CAIsoul commented 8 years ago

Exactly. Is it a bug or it was designed to be this way?

bhousel commented 8 years ago

Looks like a bug to me...

CAIsoul commented 8 years ago

Agree lol

slhh commented 7 years ago

This is a more general issue, iD does break relations when deleting a connecting vertex. For example deleting a highway junction node breaks routes, even where disconnecting or deleting the ways is prohibited. This is very bad because users might delete the node in order to workaround the other prevented operations, and they will likely assume, that this is save because it is not prevented.

slhh commented 7 years ago

@bhousel How about renaming this issue in "Delete connecting vertex is breaking relations." The split of an area outline in the origial description is only the method to generate a multipolygon with a connecting vertex at the node which is deleted afterwards.

We don't need to prevent the operation, we can add a new untagged way between the neighboring nodes and add as multipolygon member.

In case of a route we can do similar, but should add a tag identifing the added way as a new feature type like "Broken Route Link". This should be redered in iD indicating it as an error and should generate a warning when trying to upload. But in case it is uploaded by accident, it doesn't seem to be a severe issue for applications, and it simplifies fixing the data issue.

The "Broken Route Link" should preferably have a special behavior dragging it to be coincident with a suitable highway/railway for the route. In this case it should be absorbed by the highway/railway transfering the route membership(s).

We can use a similar approch for some other relation breaking operations like disconnect.

@bhousel If this is acceptable, I will try to make a pull request.

quincylvania commented 5 years ago

@bhousel What's the preferred behavior here? I assume we'd either disable the delete operation or allow deleting the node but keep the two member ways connected at one of the adjacent nodes.

bhousel commented 5 years ago

allow deleting the node but keep the two member ways connected at one of the adjacent nodes.

☝️ I think this is what we want it to do

slhh commented 5 years ago

@quincylvania

but keep the two member ways connected at one of the adjacent nodes.

This seems to be limited to the special case, where at least one of the member ways is untagged, and isn't a member of any other relation.