Modify

Opened 6 years ago

Closed 5 years ago

Last modified 5 years 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 by anonymous, 5 years ago

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 by skyper, 5 years ago

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.

in reply to:  2 comment:3 by anonymous, 5 years ago

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.

in reply to:  2 comment:4 by gaben, 5 years ago

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 by GerdP, 5 years ago

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 by GerdP, 5 years ago

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 by GerdP, 5 years ago

Resolution: fixed
Status: reopenedclosed

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

in reply to:  5 comment:8 by gaben, 5 years ago

Thanks GerdP!

Maybe other actions should also be changed.

What about this?

comment:9 by GerdP, 5 years ago

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 by gaben, 5 years ago

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

in reply to:  9 ; comment:11 by skyper, 5 years ago

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 by GerdP, 5 years ago

Adjacent Nodes fixed with [o35470:35471]

in reply to:  11 ; comment:13 by GerdP, 5 years ago

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

in reply to:  13 comment:14 by skyper, 5 years ago

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. 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.