osmeditor4android icon indicating copy to clipboard operation
osmeditor4android copied to clipboard

Even distribution of points along a straight line

Open davidpnewton opened this issue 3 years ago • 4 comments

When doing things like mapping parking spaces and other items which occur regularly and evenly along a straight line it is very useful in JOSM to be able to select a number of nodes along a straight way and distribute those nodes along the way with even spacing. The keyboard shortcut for this in JOSM is Shift + B.

Please add similar functionality to Vespucci, available when at least three nodes along a given way are multi-selected.

davidpnewton avatar Feb 06 '22 03:02 davidpnewton

I am waiting for such a feature since a long time, too. See my comments in issue #881 (July 2020) and issue #1267 of October 2020 ...

Please note: Not only a distribute nodes feature could be added, also the straighten feature could be improved – at the moment you can only straighten a selected unclosed line (with more than 2 nodes), but not any selected nodes (if more than 2 of course) – like the JOSM command “Align Nodes in Line” (shortcut in JOSM: L) is working ... a very basic thing IMO ...

jajajaneeneenee avatar Feb 19 '22 04:02 jajajaneeneenee

Please add similar functionality to Vespucci, available when at least three nodes along a given way are multi-selected.

This is not as trivial as it sounds. In particular the geometry of ways in OSM are defined by the nodes, that is moving the nodes changes the geometry . This leads to a large number of situations that need to be handled, for example what to do if a line isn't "straight" (moving a corner node will change the length of the way), closed ways, shared nodes and so on.

simonpoole avatar Feb 23 '22 08:02 simonpoole

This is not as trivial as it sounds. In particular the geometry of ways in OSM are defined by the nodes, that is moving the nodes changes the geometry . This leads to a large number of situations that need to be handled, for example what to do if a line isn't "straight" (moving a corner node will change the length of the way), closed ways, shared nodes and so on.

I don't know much about the backgrounds of the geometry definitions in OSM ... From my point of view, any operation like this will only change the coordinates of nodes – so nothing will change for closed ways or other structures (nothing will be merged and so on ...). And I don't understand your example – of course moving a corner node will change the length of the way it's connected with, if not, I wouldn't want to align these nodes. Or do you have to calculate all these changes in lengths when changing the coordinates of the nodes?

Perhaps not an argument against the difficulties, but at least for JOSM it seems to be possible. I always thought this shouldn't be a big thing ... What a pity if it is really so difficult that it will not come for Vespucci ... I always thought that you simply forgot to implement this and are too busy with other things.

At the moment my practice is that I often have to rework things in JOSM, which I did outside in Vespucci (and I have to remember it). With such a function in Vespucci, this wouldn't be necessary in many cases.

jajajaneeneenee avatar Feb 25 '22 13:02 jajajaneeneenee

Solution to this? Make running the straighten way routine a pre-requisite for it.

Straighten way is already in the software so there's no additional coding required there and running that routine would automatically make sure that everything is lined up ready for even distribution. That stops corners and closed ways being a problem.

davidpnewton avatar Feb 25 '22 15:02 davidpnewton

Duplicate of https://github.com/MarcusWolschon/osmeditor4android/issues/1267

simonpoole avatar Feb 01 '23 09:02 simonpoole