Align nodes

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Align nodes

19b350d2-b1b3-4edb-ad96-288ea1238eee
Hello,

 

Is there a way in JOSM to align nodes other than based on the two extreme
points (the 'L' keyboard shortcut) ?

 

For example, align based on the first two selected nodes and the rest of
nodes get aligned on that ?

 

This is particularly useful when you add nodes to already correctly aligned
nodes.

 

Thank you.

Reply | Threaded
Open this post in threaded view
|

Re: Align nodes

Jo-2
if you use Shift-B you align the nodes + distribute them evenly.

if you use 'o', the nodes get distributed on a curve. (doesn't have to be a
full circle)

Did you try selecting just a subset of nodes, either by bounding box select
(s) or lasso select (ss) and then 'l'?

if you select 1 node, you can select 2 adjacent ones with 'e', after which
you can use 'l' or shift-B.
I think you need the utils-plugin2 for that to work, but that plugin has so
many other interesting tools that it's always useful to have it installed.

Polyglot

Op zo 7 okt. 2018 om 09:39 schreef OSMDoudou <
[hidden email]>:

> Hello,
>
>
>
> Is there a way in JOSM to align nodes other than based on the two extreme
> points (the 'L' keyboard shortcut) ?
>
>
>
> For example, align based on the first two selected nodes and the rest of
> nodes get aligned on that ?
>
>
>
> This is particularly useful when you add nodes to already correctly aligned
> nodes.
>
>
>
> Thank you.
>
>
Reply | Threaded
Open this post in threaded view
|

RE: Align nodes

19b350d2-b1b3-4edb-ad96-288ea1238eee
With 'L' keyboard shortcut, nodes 1 and 3 determine the new position of node 2, which is not what I'd like.

What I'd like is nodes 1 and 2 determine the new position of node 3 (and possibly the other selected nodes).

Or a way to easily add node 3 in alignment of nodes 1 and 2.

For example, imagine you need to add a barrier in perfect alignment with an existing wall on a building.

You select an existing corner of the building, hit 'A' to add a node to form a new way representing the barrier.

Of course it's very hard to place that new node perfectly in alignment with the existing wall.

If you selected nodes 1, 2 and 3 and press 'L', you'll move node 2, which was presumably already correctly aligned and moving it is thus not desirable.

The "Angle Snapping" feature does it almost. [1]

"Almost" because it works with segments, so you can easily continue an existing barrier in perfect alignment.

But it doesn't work with selecting two nodes of a closed way. You would need to first split the segment from the building, draw the barrier and close the building way again, which is far from straightforward.

[1] https://josm.openstreetmap.de/wiki/Help/Action/Draw/AngleSnap


Reply | Threaded
Open this post in threaded view
|

Re: Align nodes

dieterdreist


sent from a phone

> On 7. Oct 2018, at 16:32, OSMDoudou <[hidden email]> wrote:
>
> But it doesn't work with selecting two nodes of a closed way. You would need to first split the segment from the building, draw the barrier and close the building way again, which is far from straightforward.


this would have been my suggestion as well: draw in snapping mode and then delete the helper geometry you only needed to add to make snapping work.

In general there is no “perfection” of man made objects in the real world, walls don’t get built with subcentimeter precision, and we usually do not have better positional accuracy than a few meters in our mapping, so this is mostly an academic exercise anyway.


Cheers, Martin
Reply | Threaded
Open this post in threaded view
|

Re: Align nodes

Jo-2
I think it does look nice on the map if features are nicely aligned (If
that corresponds to the reality, ofc).

What I would do, is draw a helper line between those 2 nodes, then maybe
parallel ways

Or start drawing a rectangle with the buildings-tools plugin.
Then split that and remove the unneeded parts. This gives you a line
parallel to those 2 nodes with perfectly aligned nodes.

(Hopefully I didn't misunderstand the intent)

Polyglot

Op ma 8 okt. 2018 om 10:17 schreef Martin Koppenhoefer <
[hidden email]>:

>
>
> sent from a phone
>
> > On 7. Oct 2018, at 16:32, OSMDoudou <
> [hidden email]> wrote:
> >
> > But it doesn't work with selecting two nodes of a closed way. You would
> need to first split the segment from the building, draw the barrier and
> close the building way again, which is far from straightforward.
>
>
> this would have been my suggestion as well: draw in snapping mode and then
> delete the helper geometry you only needed to add to make snapping work.
>
> In general there is no “perfection” of man made objects in the real world,
> walls don’t get built with subcentimeter precision, and we usually do not
> have better positional accuracy than a few meters in our mapping, so this
> is mostly an academic exercise anyway.
>
>
> Cheers, Martin
>
Reply | Threaded
Open this post in threaded view
|

RE: Align nodes

19b350d2-b1b3-4edb-ad96-288ea1238eee
@ winfixit,

The building plugin can indeed be a hack, but still complicated manipulations for a presumably simple task.

I also found More tools > Align way nodes (Shift + L) - which comes with utilsplugin2, I think - does more or less what I have in mind, but again with an open line not to add a line that comes in continuation to a wall of an existing building.

@ Martin,

Indeed, we're talking about details. I'm asking if a feature exist and if not I'm suggesting it would nicely complement the many existing features in JOSM to draw geometric shapes (line, rectangle, circle, arc, etc.).