Debian Codegraph @

doc/addresses/address.txt

raw
1 = Address information =
2
3 Each POI (in the range 0x?? to 0x??) and street in mkgmap generated maps can have some additional attributes. They can be assigned in the style file by setting mkgmap special tags.
4
5 == POIs ==
6 Additional attributes for POIs can be used only for POIs with Garmin code 0x?? to 0x??. POIs in the extended range 0x???? to 0x???? do not support these additional attributes.
7
8 POIs can have the following attributes:
9 [options="header"]
10 |=========================================================
11 |Attribute |mkgmap tag |Example |Notes
12 |Name |name |Pizza Express |Name of the POI
13 |Country |mkgmap:country |GBR |Three letter ISO code, e.g. for GBR United Kingdom
14 |Region |mkgmap:region |Nottinghamshire |The regions name. Useful if there are multiple cities with the same name.
15 |City |mkgmap:city |Nottingham |
16 |Street |mkgmap:street |King Street |
17 |Housenumber |mkgmap:housenumber |20 |
18 |Zipcode |mkgmap:postal_code |NG1 2AS |
19 |Phone |mkgmap:phone |+44 115 999999 |Phone number in any format
20 |=========================================================
21
22 The additional information is displayed if the POI is selected. Only the name, city, region and country information is used for searching.
23
24 == Streets ==
25 Each street can have the following attributes:
26 [options="header"]
27 |=========================================================
28 |Attribute |mkgmap tag |Example |Notes
29 |Name |name |King Street |Street name
30 |Country |mkgmap:country |GBR |Three letter ISO code, e.g. for GBR United Kingdom
31 |Region |mkgmap:region |Nottinghamshire |The regions name. Useful if there are multiple cities with the same name.
32 |City |mkgmap:city |Nottingham |
33 |Zipcode |mkgmap:postal_code |NG1 2AS |
34 |=========================================================
35
36 == LocatorConfig.xml ==
37 The +LocatorConfig.xml+ config file contains information about all countries used by mkgmap.
38
39 ----
40 <country name="Schweiz" abr="CHE" streetBeforeHousenumber="true" postalcodeBeforeCity="true">
41 <variant>Switzerland</variant>
42 <variant>Suisse</variant>
43 <variant>CH</variant>
44 <variant>CHE</variant>
45 </country>
46 ----
47
48 This includes the +name+ of the country and several of its +variants+. The ISO 3166-1 alpha 3
49 (+abr+) code is used by mkgmap internally and in the style file to have a unique naming
50 of countries.
51
52 TIP: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3[Wikipedia] has a list of all ISO 3166-1 alpha 3 codes
53
54 The two flags +streetBeforeHousenumber+ and +postalcodeBeforeCity+ determines the address order used on the GPS device.
55
56 == Assigning the mkgmap tags ==
57 The style file can be used to assign the special mkgmap tags listed above.
58
59 NOTE: All tags can be assigned without any restrictions but mkgmap performs some special processing for the +mkgmap:country+ tag. See chapter +Country names+ below.
60
61 A common set of address rules is located in the +inc/address+ file in the default style of mkgmap.
62 The tag mkgmap:execute_finalize_rules=true should be set for all objects that
63 should be considered for address search but may not appear in the map:
64 addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
65
66 You can also use the tag mkgmap:numbers=false to tell mkgmap
67 that a node or way should be excluded when calculating address information.
68
69 A common rule set to assign the +mkgmap:city+ tag looks like:
70 ----
71 mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' }
72 mkgmap:city!=* & mkgmap:admin_level7=* { set mkgmap:city='${mkgmap:admin_level7}' }
73 mkgmap:city!=* & is_in:city=* { set mkgmap:city='${is_in:city}' }
74 mkgmap:city!=* & addr:city=* { set mkgmap:city='${addr:city}' }
75 ----
76
77 The first non empty tag of +mkgmap:admin_level8+, +mkgmap:admin_level7+, +is_in:city+ and +addr:city+ is used to assign the +mkgmap:city+ tag and
78 therefore the city name of the OSM element.
79
80 Usually the +mkgmap:country+ tag should be assigned first. After that it is possible to have country specific rules.
81 ----
82 mkgmap:country=CAN & mkgmap:region!=* & mkgmap:admin_level4=* { set mkgmap:region='${mkgmap:admin_level4}' }
83 ----
84
85 === Country names ===
86 Each country has a long name (United Kingdom) and the ISO 3166-1 alpha 3 code (GBR).
87 To avoid a big diversity of combinations for one country (e.g. United Kingdom/GBR, Great Britain/GBR, England/GBR, etc.)
88 mkgmap first converts the value of +mkgmap:country+ internally to the ISO code. The country name and all variants
89 from the +LocatorConfig.xml+ and country names in all languages from the preprocessed bounds are
90 used for this.
91
92 .Evaluation of the long name
93 +mkgmap:country+ is empty::
94 The value of the +country-name+ parameter is used as country name and the value of the +country-abbr+ parameter as three letter ISO code.
95 Value of +mkgmap:country+ is unknown::
96 In case the country name cannot be assigned to a known country the given country name is used and the +country-abbr+ parameter is used as three letter ISO code.
97 Preprocessed bounds are used::
98 The long name of the country is retrieved by evaluating the +name-tag-list+ option on the country relation that is stored in the preprocessed bounds.
99 Preprocessed bounds are not used::
100 The long name is taken from the +name+ attribute of the +LocatorConfig.xml+ entry.
101
102 == Preprocessed bounds ==
103 In OSM a reasonable number of POIs and streets are not tagged directly with all information required to fill the additional attributes.
104 For example it is very uncommon to tag a street with the city and country name the street is located in.
105
106 mkgmap uses so called preprocessed bounds files to provide a quick method assign the lies-in relationship for some hard wired tags:
107 * admin_level=2..11
108 * postal_code
109
110 TODO: Parameter, mkgmap tags
111
112 === Creating preprocessed bounds ===
113 Preprocessing bounds is a procedure to extract and prepare all boundary and zip code data with from a large
114 OSM extract (like europe extract or asia extract). The data is prepared in such a format that mkgmap
115 can read and process in a fast way while compiling maps.
116
117 Preprocessing consists of two (or three) steps:
118
119 . Extracting the required data from the large OSM extract
120 . Preprocessing the extract
121 . Eventually merge multiple preprocessed extracts
122
123 ==== Extracting data ====
124 The boundary and zip code data must be extracted from a large OSM extract to avoid excessive memory
125 requirements in the preprocessing step.
126
127 NOTE: This manual describes the usage of the two tools +osmconvert+ and +osmfilter+. The same can be achieved
128 with other tools like +osmosis+.
129
130 [TIP]
131 ==========
132 +osmconvert+ http://wiki.openstreetmap.org/wiki/Osmconvert
133
134 +osmfilter+ http://wiki.openstreetmap.org/wiki/Osmfilter
135 ==========
136
137
138 .Extract data from europe.osm.pbf
139 =================================
140 After download the OSM extract (europe.osm.pbf in this example) the extract must be converted
141 to o5m format. This o5m file is then filtered.
142
143 osmconvert europe.osm.pbf --out-o5m >europe.o5m
144 osmfilter europe.o5m --keep-nodes= --keep-ways-relations="boundary=administrative =postal_code postal_code=" --out-o5m > europe-boundaries.o5m
145
146 =================================
147
148 ==== Preprocessing data ====
149 The tool for preprocessing the boundary and zip code data is contained in the common mkgmap download.
150
151 .Preprocessing bounds data
152 =================================
153 # The following should be all one line
154 java -cp mkgmap.jar
155 uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryPreprocessor
156 europe-boundaries.o5m
157 europe_bounds
158 =================================
159
160 This will create a directory called europe_bounds containing multiple files with preprocessed bounds.
161 This directory can be used with the bounds option on the mkgmap command line.
162
163
164 ==== Merging preprocessed data ====
165 Preprocessing requires a quite high amount of memory, e.g. north- and south-america requires around 3 GB. So on many systems
166 it is not possible to preprocess the whole planet at once. It is possible to divide the planet into several parts where each country
167 must be contained completely in one of the parts. Parts should overlap.
168
169 Each part is preprocessed in its own directory which are merged as a third step.
170
171 .Merging preprocessed data
172 =================================
173 # The following should be all one line
174 java -cp mkgmap.jar
175 uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryMerger
176 part1
177 part2
178 merged
179 =================================
180
181 This command merges the preprocessed bounds from directory +part1+ and +part2+ into the new directory +merged+.
182
183 === index parameter ===
184 TODO
185
186 === location-autofill parameter ===
187 TODO