Modify

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#4190 closed enhancement (fixed)

[PATCH] Easier way to draw a way that shares part of it nodes with an existing way

Reported by: Pekka Lampila <pekka.lampila@…> Owned by: team
Priority: minor Milestone:
Component: Core Version:
Keywords: draw follow area patch Cc: pekka.lampila@…, GuillaumeAudirac

Description

Sometimes it's necessary to draw a way that follows part of an existing way. Drawing that can be tedious, if there are lots of nodes; you have to click through all of them.

For example: Drawing a forest area that is adjacent to a lake that has been already drawn.

I will attach a patch that adds a feature to the drawing tool to address this. It's simple:
Press shift and click on a node. If there is a way that contains both the node you are drawing from and the node you clicked, added path will follow this way.
In the case of multiple ways (or single closed way) the shortest option will be used.

Attachments (3)

follow-way.diff (9.2 KB ) - added by Pekka Lampila <pekka.lampila@…> 14 years ago.
The patch
followline.diff (523 bytes ) - added by Manchito 13 years ago.
Required for the followline plugin to work
followline.tar.gz (18.9 KB ) - added by Manchito 13 years ago.
followline source

Download all attachments as: .zip

Change History (23)

by Pekka Lampila <pekka.lampila@…>, 14 years ago

Attachment: follow-way.diff added

The patch

comment:1 by bastiK, 14 years ago

Works quite nice - yet another power user feature.

Having one modifier doing 2 different things is not the best idea. It's not very likely, people stumble upon this, but just reading about one modifier doing this and that can be confusing enough. It might be better to use Alt-Shift for this. (Usually the function of 2 basic modifier can be combined, but Alt and Shift are contradictory.)

Regarding your example: if it is tedious to duplicate the ways, probably multi-polygons should be used.
(However there might be other cases, where multi-polygon is not an option.)

comment:2 by Pekka Lampila <pekka.lampila@…>, 14 years ago

Cc: pekka.lampila@… added
Summary: Easier way to draw a way that shares part of it nodes with an existing way[PATCH] Easier way to draw a way that shares part of it nodes with an existing way

comment:3 by Gubaer, 14 years ago

For example: Drawing a forest area that is adjacent to a lake that has been already drawn.

This would be a gread feature! I'm quite often missing it when mapping adjacent areas (a forest adjacent to a lake, a landuse=residential adjacent to a landuse=farm, etc.).

I'd like to apply the patch, even if it uses the Shift-modifier only. Any objections?

comment:4 by stoecker, 14 years ago

I'm not really happy with overusing the modifier buttons.

comment:5 by GuillaumeAudirac, 14 years ago

Cc: GuillaumeAudirac added

I was looking for a similar functionality to duplicate a way without duplicating the nodes. It is indeed a great feature when drawing for example administrative limits which often match some natural limits (rivers, roads...).
I have checked the patch which works quite well, and I am happy with it.

I agree with the unsuitable modifier 'Shift' which will affect the expected behavior. I have a proposal: why not adding another key like 'F' (for Follow) to enable this mode during drawing. This would avoid the use of any modifier.
If 'F' is pressed, and the new node is on the same way as the previous node, follow the way. If not, draw using the default add mode. 'F' would need to be triggered again if needed.

comment:6 by bastiK, 14 years ago

Ticket #4880 has been marked as a duplicate of this ticket.

comment:7 by bastiK, 13 years ago

Ticket #5527 has been marked as a duplicate of this ticket.

comment:8 by Pontiac_CZ, 13 years ago

How far is implementing of this feature into stable release?

I've just tried (with stable version 3514) SHIFT + click and SHIFT + ALT + click and the behavior seems to be the same (behaves as only SHIFT is pressed, draws single nodes without connecting with the previous ones). So I guess modifier combination SHIFT + ALT should be OK to use for this purpose.
Or use the "F" key or whatever as a toggle.

I am starting to tag meadows, fields and forests (well I guess not only me) and this would be an appreciated feature!

comment:9 by bastiK, 13 years ago

The function should be accessible without studying the documentation and learning shortcut lists by heard. We haven't found a user friendly integration, yet, so it's put on hold.

comment:10 by Pontiac_CZ, 13 years ago

I think this should be no problem as long as JOSM shows the meaning of modifiers combination in the status line. I suppose I am not the only one who tries various modifiers and verifies their function in the status or through the cursor change until he finds the correct one (studying documentation is usually the last way to go :-).

And I was always wondering why for instance SHIFT + ALT had the same effect as a single SHIFT. Let's put this function on ALT + SHIFT as you proposed some 10 months ago. Users of JOSM are smart and I am sure they won't have troubles with finding and using this function if it is indicated in the status line and via some graphics change (the status line would be enough). It is common knowledge that modifiers modify the function of actual tool and many are used to it from more complex SW like graphic editing programs and expect such behavior.

Well, actually I can't believe such a useful function (which is already written and works fine) hangs only on a question which key(s) it should be assigned to. Has the entire Pekka's work on the patch been in vain? :-o

comment:11 by stoecker, 13 years ago

Is this something for utilsplugin2?

comment:12 by bastiK, 13 years ago

I suggest doing it the Potlatch way. This would work without modifiers, but requires some rework of the patch.

in reply to:  12 ; comment:13 by skyper, 13 years ago

Replying to bastiK:

I suggest doing it the Potlatch way. This would work without modifiers, but requires some rework of the patch.

There might be hundred of nodes.
It would be nice if you could just select the first shared node and the last shared node and do not have to make an action for each node in between like Potlatch does it.

in reply to:  13 comment:14 by bastiK, 13 years ago

Replying to skyper:

There might be hundred of nodes.

I consider this limitation a feature: If there are hundreds of nodes, you are better off using multipolygons.

comment:15 by stoecker, 13 years ago

Is the "potlatch way" the same as has been implemented in utilsplugin2 now?

in reply to:  15 comment:16 by akks, 13 years ago

Replying to stoecker:

Is the "potlatch way" the same as has been implemented in utilsplugin2 now?

I am afraid no. Did not know about this wow-feature of Potlatch) Our additions to UtilsPlugin do not create ways or nodes, but only select or modify their tags.

As I think, some shortcut should be added to line drawing mode (part of core) that work like Potlatch and another that work like this patch.
Maybe clicks are too important to redefine Ctrl, Alt, Shift are useful enough. Ctrl+Alt,Ctrl+Shift,Alt-Shift - too :)

by Manchito, 13 years ago

Attachment: followline.diff added

Required for the followline plugin to work

by Manchito, 13 years ago

Attachment: followline.tar.gz added

followline source

comment:17 by Manchito, 13 years ago

I have already made a plugin for this which only requires the followline.diff patch and sets a menu entry and a configurable shortcut. I haven't committed it yet (still no svn account) and I don't know what to do with it now that -looking to publish it- I've become aware of this patch. If not the code itself, perhaps the menu idea is worth taking into account.

How could we put all the pieces together in order to have this really useful feature available asap?

comment:18 by bastiK, 13 years ago

Resolution: fixed
Status: newclosed

In [4086/josm]:

new follow line action (author: Germán Márquez Mejía) fixes #4190

comment:19 by bastiK, 13 years ago

When there is a short help page, we can announce in the start up change log.

in reply to:  19 comment:20 by Manchito, 13 years ago

Replying to bastiK:

When there is a short help page, we can announce in the start up change log.

Thanks! There is a help page now.

http://josm.openstreetmap.de/wiki/Help/Action/FollowLine

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.