#4190 closed enhancement (fixed)
[PATCH] Easier way to draw a way that shares part of it nodes with an existing way
Reported by: | 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)
Change History (23)
by , 15 years ago
Attachment: | follow-way.diff added |
---|
comment:1 by , 15 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 , 15 years ago
Cc: | 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 , 15 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:5 by , 15 years ago
Cc: | 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:8 by , 15 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 , 15 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 , 15 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
follow-up: 13 comment:12 by , 14 years ago
I suggest doing it the Potlatch way. This would work without modifiers, but requires some rework of the patch.
follow-up: 14 comment:13 by , 14 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.
comment:14 by , 14 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.
follow-up: 16 comment:15 by , 14 years ago
Is the "potlatch way" the same as has been implemented in utilsplugin2 now?
comment:16 by , 14 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 :)
comment:17 by , 14 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?
follow-up: 20 comment:19 by , 14 years ago
When there is a short help page, we can announce in the start up change log.
comment:20 by , 14 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.
The patch