1 | Road Signs Plugin
|
---|
2 | =================
|
---|
3 |
|
---|
4 | Shows a GUI dialog to tag objects by clicking on road sign symbols.
|
---|
5 | It tries to generate the corresponding tags for the object.
|
---|
6 |
|
---|
7 | Author:
|
---|
8 | Paul Hartmann <phaaurlt@googlemail.com>
|
---|
9 |
|
---|
10 | License:
|
---|
11 | GPL v2 or later.
|
---|
12 |
|
---|
13 | Acknowledgements:
|
---|
14 | Inspired by the Verkehrszeichen Tool [1] by Sebastian Hohmann.
|
---|
15 | Basically, this plugin is a port to Java and the JOSM (plugin) framework.
|
---|
16 | [1] http://osmtools.de/traffic_signs/
|
---|
17 |
|
---|
18 | Pics for the German preset have been derived from
|
---|
19 | http://de.wikipedia.org/wiki/Bildtafel_der_Verkehrszeichen_in_Deutschland (german street sign SVGs)
|
---|
20 |
|
---|
21 | How to install a custom preset
|
---|
22 | ------------------------------
|
---|
23 |
|
---|
24 | Add the following entry in the advanced preferences [1]:
|
---|
25 |
|
---|
26 | plugin.roadsigns.sources=/path/to/myroadsignpreset.xml
|
---|
27 |
|
---|
28 | (The value can be either "simple" or "list" type)
|
---|
29 | The chosen preset should be loaded automatically after a restart.
|
---|
30 |
|
---|
31 | Images can be placed in the same folder as the preset .xml file. Alternatively, you can also specify a path for icons:
|
---|
32 |
|
---|
33 | plugin.roadsigns.icon.sources=/path/to/image/folder
|
---|
34 |
|
---|
35 | [1] http://josm.openstreetmap.de/wiki/Help/Preferences/Advanced
|
---|
36 |
|
---|
37 | Preset Format
|
---|
38 | -------------
|
---|
39 |
|
---|
40 | The first preset was data/roadsignpresetDE.xml, so you might want to look there for examples.
|
---|
41 |
|
---|
42 | Some values can contain parameters like $foo, that will be replaced by the value of the parameter named foo.
|
---|
43 |
|
---|
44 | sign:
|
---|
45 | ref Short official designation of the sign that can be used for the traffic_sign tag. (accepts parameters)
|
---|
46 | id Unique identifier. (If missing, equals ref. Either id or ref must be present.)
|
---|
47 | icon Icon image name. (If missing, id or ref is used as image name. In this case ':' and '.' characters are converted to underscore '_'.)
|
---|
48 | name Name of the sign. (required)
|
---|
49 | long_name Long (e.g. official) name of the sign.
|
---|
50 | traffic_sign_tag Value that should be used for traffic_sign tag (if different from ref).
|
---|
51 | help Some notes to guide the user.
|
---|
52 | wiki Page in the osm wiki
|
---|
53 | deprecated Set to "yes" if authorities have decided to no longer install signs of this kind.
|
---|
54 | (But old signs may still be there and need to be recorded.)
|
---|
55 | useful (optional) The user can choose to show only a selection of the most useful signs.
|
---|
56 | By default, a sign with <tag> information is treated as useful. This can be overridden
|
---|
57 | by setting this attribute. Possible values: true, false.
|
---|
58 |
|
---|
59 | tag:
|
---|
60 | Some tags can be named (ident=*) and modified by other subsequent tags. If this finally results in an
|
---|
61 | empty value (""), then the tag is skipped altogether. Note that the default value of a named tag is
|
---|
62 | only used if there are no appending tags. E.g. access=no becomes access=delivery and not access=no;delivery.
|
---|
63 |
|
---|
64 | static tags:
|
---|
65 | key The key text. (accepts parameters)
|
---|
66 | value The value text. (accepts parameters)
|
---|
67 |
|
---|
68 | named tags:
|
---|
69 | key The key text.
|
---|
70 | value The default value text. If the final evaluation of the value results in an empty string, the tag is dropped.
|
---|
71 | ident Name a tag so it can later be changed by other tags.
|
---|
72 |
|
---|
73 | modifying tags:
|
---|
74 | appending:
|
---|
75 | tag_ref Name of the tag to be changed.
|
---|
76 | append_value Append a string to the value of the tag. The default value of the identified tag is dropped (unless there is no
|
---|
77 | modifying tag appending a value).
|
---|
78 | condition:
|
---|
79 | tag_ref Name of the tag to be changed.
|
---|
80 | condition The condition to add. (K=V becomes K:cond=V.)
|
---|
81 |
|
---|
82 | parameter:
|
---|
83 | ident identifier to get the value of this parameter (required)
|
---|
84 | input input type (currently "textfield" and "combo" are possible values) (required)
|
---|
85 | prefix text to put before the input area
|
---|
86 | suffix text to put after the input area
|
---|
87 | field_width for text fields: the width of the field (number of characters)
|
---|
88 | default default value (required)
|
---|
89 |
|
---|
90 | supplementary: (list of recommended additional signs)
|
---|
91 | id the id of the supplementary sign
|
---|
92 |
|
---|
93 |
|
---|
94 | JavaCC usage:
|
---|
95 | -------------
|
---|
96 |
|
---|
97 | There is a simple format to insert parameters into strings. E.g. keys,
|
---|
98 | values and refs in the preset file can contain '$foo' or '${foo}' which
|
---|
99 | will be replaced by the value of the parameter named foo.
|
---|
100 | (Textual "$" or "\" is escaped as "\$" or "\\".)
|
---|
101 |
|
---|
102 | javacc is used for easier tokenization. All *.java files in the folder
|
---|
103 | plugins/roadsigns/javacc are auto generated. To create them, execute
|
---|
104 |
|
---|
105 | javacc ParamString.jj
|
---|
106 |
|
---|
107 | (Provided javacc is installed. Not necessary if that file is not changed.)
|
---|