NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Is there a way to conditionally branch within the preset or to apply different tags based on a choice, if this do that, else do this? I use a basic preset to tag bridges. I first break the highway in two places and then with the center segment selected, apply the preset which simply applies the tags bridge=yes and layer=1. What I would like to be able to do is choose whether to apply the bridge tagging or instead, break a stream into sections and set tags to tunnel=culvert and layer=-1 on its center segment.

Thanks...

asked 24 Oct '14, 03:49

AlaskaDave's gravatar image

AlaskaDave
5.4k76107164
accept rate: 16%

edited 24 Oct '14, 13:21

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


If I understand you correctly, you want to have the -same- preset apply different tags depending on the existing tags of the selected object.

It may be possible to do something with the "match" attribute to emulate the behavior you want, however I haven't tested it. The real place to look at is the relevant JOSM source code. Or maybe ask on the "editors" forum.

permanent link

answered 24 Oct '14, 13:46

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

2

Not quite. The applied tags would not depend on any existing tags. I want to combine two presets into one, sort of. Rather than having a separate preset for bridge and one for tunnel/ culvert, I would like a choice presented in the preset so that if I select "Bridge" it applies the bridge tags (bridge=yes and layer=1) and if I select Tunnel it applies the tags for tunnel=culvert and layer=-1

(25 Oct '14, 01:25) AlaskaDave

Hi AlaskaDave, are you building an automated editor ? Did you consider the use of the copy button (edit - nr. 3) in JOSM, it works fine as long as you stick to the same items. Start with the well equipped stations, copy and delete the unnecessary keys afterwards.

permanent link

answered 24 Oct '14, 13:12

Hendrikklaas's gravatar image

Hendrikklaas
9.3k207238387
accept rate: 5%

1

@Hendrik - Not an automated editor but a single preset with some choices available, sort of the way you can create a drop-down list inside a preset. JOSM already has this sort of automatic tagging but you must work through three different menus (Presets>Water>Tunnel) to get to the one for tunnel, for example.

I know I can copy tags from an existing object (if one happens to be nearby) but I want to automate the process to suit my needs better.

(25 Oct '14, 01:32) AlaskaDave

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:

×622
×16
×11

question asked: 24 Oct '14, 03:49

question was seen: 7,635 times

last updated: 25 Oct '14, 01:32

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum