3
1

I'm looking for a way to streamline the entry of tags I use all the time. The Building preset in JOSM is the sort of thing I want although it does much more than tag building=yes. In my case I merely wish to tag farm ponds with three keys. I would draw the ways and connect them but I'm looking for a method to apply those three keys once that part is done by typing a simple keyboard shortcut like [Ctrl]-P for example.

natural=water

water=pond

source=Bing

Obviously, there are many other multiple key=value combinations that come to mind if I had this capability.

I'm experimenting with Autohotkey, a keystroke macro program, but so far I'm not having much luck. I did see an reference to Autohotkey somewhere in the OSM Wiki or Help but it was in German. Any AHK experts out there?

Alternatively, is there some non-programmatic way to create a Custom Preset in JOSM?

asked 02 Mar '13, 10:23

AlaskaDave's gravatar image

AlaskaDave
3.9k7093141
accept rate: 12%

edited 02 Mar '13, 14:42

gormo's gravatar image

gormo
2.9k32660

1

@AlaskaDave Interesting. Autohotkey is for Windows. Does someone have a good Linux solution for this?

(25 Apr '16, 07:13) rwst

The message in the Version 5759 of JOSM says that "Ctrl-Shift-V now can paste tags from text buffer, e.g., a=2,c=3 and a 2 c 3"

I copied the following text from a text editor and pasted and into a way using Ctrl-Shift-V and worked as expected.
highway=residential
name=Street Name
source=GPS

You can keep a set of tags in a text file and follow this method till JOSM get the macro functionality.

permanent link

answered 10 Mar '13, 15:20

BlueTiger's gravatar image

BlueTiger
4665822
accept rate: 33%

@BlueTiger - I read that note on Version 5759 as well but hadn't got around to experimenting with it yet. I could create a text file containing several of my most common "presets" this way. Thanks for the tip.

(10 Mar '13, 22:42) AlaskaDave

@AlaskaDave, you're welcome. I should thank you as well as your question made me look through the documentation :)

(11 Mar '13, 04:06) BlueTiger

I think the best option is to use custom presets in JOSM. There is details of how to create presets here: Tagging presets

The easiest way is to copy an example, and modify it for the tags you want. So for your tagging ponds, try something like this:

<presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0">
<item name="Pond" type="node,closedway">
<label text="Tagging a pond" />
<key key="natural" value="water" />
<key key="water" value="pond" />
<key key="source" value="Bing" />
</item>
</presets>

Or on Pastebin if its not formatted properly here: JOSM presets example

Copy that into a text editor, and save it as something like ponds.xml. Then open JOSM, and go to Preferences, then choose the 3rd icon down (Map settings), then select the tab for "Tagging presets". Then in the section for active presets, click on the "+" icon, and select your ponds.xml file. Then restart JOSM, and then Ponds should be available on the Presets menu.

It seems it is not possible to set a keyboard shortcut for a preset in JOSM. But you can add the preset to the toolbar - go to Preferences, then 5th icon down. Then you can just click on the toolbar button to add all of your tags.

permanent link

answered 02 Mar '13, 13:57

Vclaw's gravatar image

Vclaw
9.1k891140
accept rate: 22%

1

@Vclaw: Cool. This is pretty much what I was looking for, that is, a step-by-step example of how to set up presets in JOSM. I did come across the page you referenced in my searches but your example is clearer and more concise. Plus, you did the work for me ;-)

I followed directions, customized the coding a bit, and installed it in my JOSM setup. It works like a charm.

Thanks...

(03 Mar '13, 03:39) AlaskaDave

Shortcuts for presets are discussed in enhancement request #3484.

(10 Mar '13, 14:44) hfs
1

No keyboard shortcut, that's true, but you can press F3 (this brings up a search dialog for all presets) and then start typing Pond. JOSM "learns" and the second time (in 1 edit session) Pond will be higher up in the list, so F3 - P might be enough then.

(11 Mar '13, 05:08) escada

Draw one, set all three keys, then press ctrl+c.

Draw the next one, press ctrl+shift+v, this pastes only the tags onto the current selection.

permanent link

answered 02 Mar '13, 14:41

gormo's gravatar image

gormo
2.9k32660
accept rate: 13%

1

Thanks gomo - I did know about the Cut and Paste functionality but it works best if you are doing several ponds located close to one another.

Potlatch2's Repeat hot-key "R" is much better IMO. Just touch a way or node you want to duplicate then touch the one you want to tag and press R. This is one feature I am constantly missing in JOSM.

(03 Mar '13, 03:44) AlaskaDave
1

AlaskaDave, To get the repeat hot-key in JOSM use the "utilsplugin2" plugin and use "Shift+R" the same way you used "R" in Potlatch2

https://wiki.openstreetmap.org/wiki/JOSM/Plugins/utilsplugin2

(05 Mar '14, 17:29) mhenson

Thanks for your answer, mhenson. Yes, I know about Shift-R now but when I asked that question I was new to JOSM. I use custom presets and AutoHotKey (AHK) to apply them. The custom presets I developed help me add multiple tags to features quickly and consistently. Even without AHK, they're a huge time saver.

(05 Mar '14, 23:42) AlaskaDave

At this time (late 2017), the best option for JOSM users is EasyPresets by Maripo. This should now be installable from within JOSM, Settings > Plugins.

permanent link

answered 04 Jan '18, 06:24

GOwin's gravatar image

GOwin
111
accept rate: 0%

Yeah, that looks like a nice option. Since I asked this question, I've developed many of my own custom presets and many Autohotkey shortcuts as well. So, I'm all set. But thanks for the information. Others may benefit from it.

(04 Jan '18, 11:38) AlaskaDave
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×513
×14
×11
×1
×1

question asked: 02 Mar '13, 10:23

question was seen: 6,069 times

last updated: 04 Jan '18, 11:38

powered by OSQA