Modify

Opened 14 years ago

Closed 11 years ago

Last modified 11 years ago

#6819 closed defect (fixed)

[patch] Align nodes in line should respect straight crossing lines

Reported by: kempelen Owned by: team
Priority: normal Milestone: 14.03
Component: Core Version:
Keywords: Cc:

Description (last modified by Balaitous)

The current algorithm for "Align Nodes in Line" is very simple. We use it to straighten ways that are straight in the world. If the modified street crosses other streets, which are also straight, this function makes the crossing streets not straight anymore (this is an error).

To make a part of a city straight, one needs to repeat this function on a way, and then all crossing ways that were straight, and then again and again, to minimize the error (but still, nothing but the last way will be really straight). This may affect many streets, require a lot of manual work, that could be replaced with math in JOSM.

The routine could handle this frequent "special case":

When a node, which is being moved:

  • exactly 4 ways connect
  • end of 2 of those are part of the straighten operation
  • end of the 2 others are already in line with the node being moved

...move the node on the already straight line, by calculating the junction of the new straight line and the existing straight line.

I'll attach a screenshot where straight line gets an angle if the selected line is "aligned".

Attachments (2)

align-nodes-in-line.png (9.7 KB ) - added by kempelen 14 years ago.
bug6819.patch (5.9 KB ) - added by Balaitous 11 years ago.

Download all attachments as: .zip

Change History (7)

by kempelen, 14 years ago

Attachment: align-nodes-in-line.png added

comment:1 by skyper, 14 years ago

Maybe it could even align several ways at once regarding the angles at intersecting nodes and also support several nodes of different ways when selecting the ways the nodes are part of. Alining a intersection would be much easier that way.

Thanks

by Balaitous, 11 years ago

Attachment: bug6819.patch added

comment:2 by Balaitous, 11 years ago

Description: modified (diff)

I propose a patch that allow align multiple ways simultaneously respecting their intersections.
See: bug6819.patch​

comment:3 by Balaitous, 11 years ago

Summary: Align nodes in line should respect straight crossing lines[patch] Align nodes in line should respect straight crossing lines

comment:4 by bastiK, 11 years ago

Resolution: fixed
Status: newclosed

In 6893/josm:

applied #6819 - Align nodes in line should respect straight crossing lines (patch by Balaitous)

comment:5 by Don-vip, 11 years ago

Milestone: 14.03

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.