I am tagging a lot of toll highways in my country so to make it easily I have created a custom Toll Infrastructure preset.

I have decided to make three items:

  1. toll booth: For tagging a place (node or closed-way) that collects a fee with cash, bank cards or other methods.
  2. toll gantry or toll bridge: For an e-toll collection system appended over the road (node). Usually non-stop or with no-human interaction.
  3. eToll payment: with different subitems for specific ways of non-stop electronic payment for each country (particularly using NFC technology). I would like to have this item inside the toll gantry option but as far I know there is no optional conditions (IF-THEN, CASE) available in the tagging preset syntax. So will be impossible to have to make small entry windows for each country.

My question is, if in a toll plaza the same lane has a toll-both and also a toll-gantry, is correct to have on one node the barrier=toll_booth and highway=toll_gantry, or for routing purposes is better to have them in two nodes?

Also, does anyone node if I can have conditional commands used in the tagging syntax presets. So I can have a combo box with countries and only show the appropriate e-toll options for that country?

Finally, what do you think if I merge first's two items? Will that be helpful?

https://josm.openstreetmap.de/josmfile?page=Presets/Toll_Infrastructure&zip=1

Manuel.

asked 16 Nov, 04:29

mdelatorre's gravatar image

mdelatorre
177129
accept rate: 0%


I don't see any easy way to do this in JOSM outside of doing it in a plugin.

JOSM presets don't really have any conditional flow of control elements and further don't implement any of the extension I support http://vespucci.io/tutorials/presets/#extensions which would at least enable region specific presets in a very easy fashion.

You can programmatically retrieve values for combo and multi-select fields with the values_from="parameterless java method" attribute. But you would need to add the method via a plugin, and access the current selected object to, in turn, determine the territory it is in and then return the appropriate values. Most of the bits and pieces should already be available to do this, but if essentially all the logic is already in a plugin there probably isn't a lot of value of involving the preset system.

permanent link

answered 16 Nov, 13:15

SimonPoole's gravatar image

SimonPoole ♦
41.8k13303660
accept rate: 19%

edited 16 Nov, 13:17

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:

×12
×9
×1
×1

question asked: 16 Nov, 04:29

question was seen: 56 times

last updated: 16 Nov, 13:17

powered by OSQA