Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug straightening way with coincident start/end nodes #2792

Closed
franco999 opened this issue Sep 30, 2015 · 6 comments
Closed

Bug straightening way with coincident start/end nodes #2792

franco999 opened this issue Sep 30, 2015 · 6 comments
Labels
bug A bug - let's fix this!

Comments

@franco999
Copy link

I do not know if this bug is already reported.
Here I embed a video with the error. https://cloud.openmailbox.org/index.php/s/JxecLPR41cL0IsN
The error occurs when I press the S key and then do zoom.

I do not know if the error is general or not. The area that I used to display the error is this: http://osm.org/go/MyGi96i8i

@SHARCRASH
Copy link

I successfully recreated the issue elsewhere. It occurs because the multipolygon is not closed in its outer line, between this end node and this other end node. So iD considers the element as a line to straighten (see the editing tools), not an area to reshape squarly as it should. That might be the reason of conflict in terms of iD programmation. Same for the building, the line ring is not closed/connected in its ends as it should (same position as the schoolgrounds). Once closed the edit tools show the proper tools If you're this user named franco999 in OSM, apparently you are new, so i just let you edit it correctly for practice. :)

By the way this unconnected node can be easily detected thanks to OSM inspector (in the View:Multipolygon list). See here. People should really consider checking it time to time.

This rises a constatation: multiple nodes overlapping perfectly not necessarily from the same "way" (line) can't be distinguished from a single node in a way, both are white... If a warning during the edits (node slowly blinking) and during the save process (a message like the untagged line) is reported, it would help preventing this kind of mistake. Myself working much with multipolygons, i would really welcome this as a bliss since i happen time to time to do it even with experience. I even avoid deconnecting nodes/ways during edits of lines to avoid a negligence to reconnect.

@franco999
Copy link
Author

@SHARCRASH Thanks for answering!
I do not understand much English but, so understood, and I corrected errors multipolygons not closed. I did not realize the mistake.
My OSM user is "mweper" and not "franco999". Regards.

@jfirebaugh
Copy link
Member

I can understand that this has something to do with straightening member ways of multipolygons, but not what the exact issue is. @SHARCRASH, can you provide a specific minimal set of steps to replicate this?

@jfirebaugh jfirebaugh changed the title Failed to press the S button erases everything. Bug with straightening member ways of a (possibly invalid?) multipolygon Jan 24, 2016
@jfirebaugh jfirebaugh added the bug A bug - let's fix this! label Jan 24, 2016
@SHARCRASH
Copy link

Sorry if i didn't reply directly, had other priorities when you had asked and then forgot.
Here are the steps to recreate the issue even without an MP relation:

  1. create a closed polygon with the line tool (no area, no MP), let's say a trapeze/near rectangle.
  2. if you reselect the line now, you can see that the square shaper tool is active, normal as it's a closed line, press the S shortcut, it will trigger the square tool.
  3. then cut a node and disconnect it
  4. reconnect both lines to have a single line/seemingly perimeter
  5. if you reselect the line now, you can see that the straighten line tool is active, normal as it's an unclosed line, *BUT * press the S shortcut, the 2 extreme nodes will be actually joined/overlapped and even nearly disappear (some pixels left) if you deselect the element or/and zoom. It should be normally avoided since when the line is "too bent", the function won't trigger the straighten tool, but it does propose the straighten line tool function.

Hope this helps! Ask further precisions if needed.

@bhousel
Copy link
Member

bhousel commented May 1, 2016

@SHARCRASH thanks for the detailed instructions..
I do see that it's possible to get into a situation where a user can create a geometry that confuses the straighten tool. The end result is a "line" with just 2 points in the same place. I made a screencast of the steps to cause this..

square_straighten_bug

@bhousel
Copy link
Member

bhousel commented May 1, 2016

Turns out that the splitting and joining is unnecessary. You can just disconnect a closed line at its connecting node, and the straighten operation will happily remove all the points in the line.

square_straighten_bug2

@bhousel bhousel changed the title Bug with straightening member ways of a (possibly invalid?) multipolygon Bug straightening way with coincident start/end nodes May 1, 2016
@bhousel bhousel closed this as completed in 9fd9629 May 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this!
Projects
None yet
Development

No branches or pull requests

4 participants