Modify

Opened 17 months ago

Closed 2 weeks ago

Last modified 11 days ago

#17258 closed enhancement (fixed)

Orthogonalisation problem using middle nodes selection

Reported by: anonymous Owned by: team
Priority: normal Milestone:
Component: Plugin utilsplugin2 Version: latest
Keywords: Cc:

Description

When you select two nodes eg. in a building which are not direct neighbours, you can use Utilsplugin2's 'middle nodes' selection (Alt+Shift+E).
The problem is if you want this way orthogonalise the nodes, it gives you wrong result because the orthogonalisation requires the nodes to be selected in strict order.

Is it possible to sort the selection to make the orthogonalisation work?

Attachments (0)

Change History (14)

comment:1 Changed 11 months ago by anonymous

Steps to reproduce:

  1. Install utilsplugin2
  1. Search a building which has many nodes (10+)
  2. Intentionally mess the shape up a bit
  3. Select the building's outline
  4. Use the utilsplugin2's node selection tool (E is the default key)
  5. Try to orthogonalise with JOSM core function (Q is the default key)

Now you should see a totally messed up building (probably) because the nodes were not selected along the way.

I hope this helps.

comment:2 Changed 11 months ago by skyper

Too much work for a single building. Did you try it by just selecting the way (building) only ?

I give you right that the ordering of selected nodes is not perfect, not just for buildings but also for unclosed ways.

comment:3 in reply to:  2 Changed 11 months ago by anonymous

Replying to skyper:

not just for buildings but also for unclosed ways.

Yeah, I wrote buildings because maybe that's the easiest to test with. It can be any type of way, only the shape matters.

Did you try it by just selecting the way (building) only?

See the following. The building which you are working on is a complex one (50+ nodes), with both semicircles and right angles. If you select the whole building to orthogonalise, you'll lose the arcs. That's not what you want.
Now, what can you do? Yes, selecting the nodes one by one manually between the arcs... or you could use the utilsplugin2 middle nodes selection.

Possible solution: order the nodes along the way within the selection.


Please note that for easiness the steps mentioned previously use 'adjacent nodes' selection, whereas the original report use 'middle nodes' selection. They are different functions, although both affected.

comment:4 in reply to:  2 Changed 3 weeks ago by gaben

Replying to skyper:

I give you right that the ordering of selected nodes is not perfect, not just for buildings but also for unclosed ways.

It was me be before registration. Hi there :) Just ran into the problem again and realized that the nodes are ordered but by their id. It doesn't make any sense for me, so ordering along the way probably wouldn't introduce any undesired behaviour.

comment:5 Changed 2 weeks ago by GerdP

Resolution: fixed
Status: newclosed

see [o35468:35469]
FYI: The selection was more or less random because a HashSet was used.
Maybe other actions should also be changed.

comment:6 Changed 2 weeks ago by GerdP

Resolution: fixed
Status: closedreopened

it will probably not always work when two nodes of a closed way are selected. Depends on the postion of the closing node. I'll look at it tomorrow...

comment:7 Changed 2 weeks ago by GerdP

Resolution: fixed
Status: reopenedclosed

Ok, no problem, if the closing point is within the selection the nodes are still added in a reasonable order.

comment:8 in reply to:  5 Changed 2 weeks ago by gaben

Thanks GerdP!

Maybe other actions should also be changed.

What about this?

comment:9 Changed 2 weeks ago by GerdP

I think E (Adjacent nodes) is a candidate. I often use it to select the nodes of a selected way, but I would not do that when I want to orthogonalise the way. Maybe open a new ticket if you see a good reason to change that as well.

comment:10 Changed 2 weeks ago by gaben

I agree, just thought you missed something :) The middle nodes selection is more than enough for orthogonalisation.

comment:11 in reply to:  9 ; Changed 13 days ago by skyper

Replying to GerdP:

I think E (Adjacent nodes) is a candidate. I often use it to select the nodes of a selected way, but I would not do that when I want to orthogonalise the way. Maybe open a new ticket if you see a good reason to change that as well.

All selection functions need to be checked and you are right about E (Adjacent nodes). Selection matters also for ways. All "Align" functions need an special order and if we talk about relations it is important, too.

How can I look at the order of selection directly ? I only found the relation editor so far. Might be worth an option for selection list.

For nodes "Adjacent nodes" needs to be fixed. "Select way nodes" is fine.
Did not check way selection tools and mixed object selection.
"All inside" is buggy, see #19280.

comment:12 Changed 12 days ago by GerdP

Adjacent Nodes fixed with [o35470:35471]

comment:13 in reply to:  11 ; Changed 12 days ago by GerdP

Replying to skyper:

How can I look at the order of selection directly ? I only found the relation editor so far. Might be worth an option for selection list.

Relation Editor is a good hint. I did not even find that ;) I thought Ctrl+C would work but it doesn't. See #19285

comment:14 in reply to:  13 Changed 11 days ago by skyper

Replying to GerdP:

Replying to skyper:

How can I look at the order of selection directly ? I only found the relation editor so far. Might be worth an option for selection list.

See #19292 for the option in selection list panel.

Relation Editor is a good hint. I did not even find that ;) I thought Ctrl+C would work but it doesn't. See #19285

Yeah, relations are the major factor for importance of order besides the "align" tools.

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.