Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#9081 closed enhancement (fixed)

[patch] "L" shortcut to nodes

Reported by: jbcorbeille-josm@… Owned by: team
Priority: normal Milestone: 14.04
Component: Core Version: tested
Keywords: align Cc:

Description

L shortcut (align) applied to nodes is great (aligns one node with its neighbours in a way).
It seems acceptable that it does not work when the node is part of 2 ways.
However, when selecting a node that is in two ways, but the last (or first) of one and not the last (or first) of the other, I guess it should align whithin the second, as it cannot be within the first.
A picture may be clearer: the selected node (red one) should be aligned within the lightgray (vertical) way, even if it is also part, but end node, of the green (horizontal) way. Currently, "L" shortcut has no effect.

Attachments (7)

josm-align.png (7.9 KB) - added by anonymous 6 years ago.
bug9081.patch (11.7 KB) - added by Balaitous 6 years ago.
align_single_node_before.jpg (4.2 KB) - added by Balaitous 6 years ago.
align_single_node_after.jpg (4.4 KB) - added by Balaitous 6 years ago.
bug9081_v2.patch (16.6 KB) - added by Balaitous 6 years ago.
new version of the patch: little improuvment for prevent stange phenomena with self crossing way
9081-self_crossing_way.png (76.6 KB) - added by Balaitous 6 years ago.
bug9081_v3.patch (19.3 KB) - added by Balaitous 6 years ago.
This patch is made with git, tell me if it is OK

Download all attachments as: .zip

Change History (15)

Changed 6 years ago by anonymous

Attachment: josm-align.png added

comment:1 Changed 6 years ago by skyper

I always use the "select child nodes" function (utils2plugin) but I would prefer to also align several ways and a mix of nodes and ways.

Changed 6 years ago by Balaitous

Attachment: bug9081.patch added

Changed 6 years ago by Balaitous

Changed 6 years ago by Balaitous

Attachment: align_single_node_after.jpg added

comment:3 Changed 6 years ago by Balaitous

Summary: "L" shortcut to nodes[patch] "L" shortcut to nodes

Patch that allow align a single nodes relative to its neighbours.
Before AlignInLineAction:

After:

Changed 6 years ago by Balaitous

Attachment: bug9081_v2.patch added

new version of the patch: little improuvment for prevent stange phenomena with self crossing way

comment:4 Changed 6 years ago by stoecker

If you do a next little improvement, please fix javadoc - there is an empty "@param way" :-) Otherwise we'll do it when applying.

comment:5 Changed 6 years ago by Don-vip

Milestone: 14.04

Changed 6 years ago by Balaitous

Attachment: 9081-self_crossing_way.png added

comment:6 Changed 6 years ago by Balaitous

The last problem was for self crossing way.
On the picture you can see 2 cases.
At the left, the node must be put at intersection of (AB) abd (CD)
At the right, at the intersection of (AC) and (BD)

I think it is solved in the 3th version of the patch.

Changed 6 years ago by Balaitous

Attachment: bug9081_v3.patch added

This patch is made with git, tell me if it is OK

comment:7 Changed 6 years ago by stoecker

Resolution: fixed
Status: newclosed

In 6961/josm:

fix #9081 - patch by Balaitous - improve alignment function in case of intersections

comment:8 Changed 6 years ago by stoecker

BTW: Self-crossing ways are always considered an error. Probably spending much time with them is wasted, a simple error output would be enough (e.g. "This way is self-crossing, fix that first").

If you want - #9873 has another case where a self-overlapping way causes an error.

comment:9 in reply to:  8 Changed 6 years ago by aceman

Replying to stoecker:

BTW: Self-crossing ways are always considered an error. Probably spending much time with them is wasted, a simple error output would be enough (e.g. "This way is self-crossing, fix that first").

Why is self crossing way an error? Also when it does have a crossing node? JOSM only warns about such ways so it is not a fatal error yet.

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.