]> git.openstreetmap.org Git - nominatim.git/blob - lib-lua/themes/nominatim/presets.lua
adapt documentation for style import
[nominatim.git] / lib-lua / themes / nominatim / presets.lua
1 -- Defines defaults used in the topic definitions.
2
3 local module = {}
4
5 -- Main tag definition
6
7 module.MAIN_TAGS = {}
8
9 module.MAIN_TAGS.admin = {
10     boundary = {administrative = 'named'},
11     landuse = {residential = 'fallback',
12                farm = 'fallback',
13                farmyard = 'fallback',
14                industrial = 'fallback',
15                commercial = 'fallback',
16                allotments = 'fallback',
17                retail = 'fallback'},
18     place = {county = 'always',
19              district = 'always',
20              municipality = 'always',
21              city = 'always',
22              town = 'always',
23              borough = 'always',
24              village = 'always',
25              suburb = 'always',
26              hamlet = 'always',
27              croft = 'always',
28              subdivision = 'always',
29              allotments = 'always',
30              neighbourhood = 'always',
31              quarter = 'always',
32              isolated_dwelling = 'always',
33              farm = 'always',
34              city_block = 'always',
35              locality = 'always'}
36 }
37
38 module.MAIN_TAGS.all_boundaries = {
39     boundary = {'named',
40                 place = 'delete',
41                 land_area = 'delete',
42                 postal_code = 'always'},
43     landuse = 'fallback',
44     place = 'always'
45 }
46
47 module.MAIN_TAGS.natural = {
48     waterway = {'named',
49                 riverbank = 'delete'},
50     natural = {'named',
51                yes = 'delete',
52                no = 'delete',
53                coastline = 'delete',
54                saddle = 'fallback'},
55     mountain_pass = {'always',
56                      no = 'delete'}
57 }
58
59 module.MAIN_TAGS_POIS = function (group)
60     group = group or 'delete'
61     return {
62     aerialway = {'always',
63                  no = group,
64                  pylon = group},
65     aeroway = {'always',
66                no = group},
67     amenity = {'always',
68                no = group,
69                parking_space = group,
70                parking_entrance = group,
71                waste_disposal = group,
72                hunting_stand = group},
73     building = {'fallback',
74                 no = group},
75     bridge = {'named_with_key',
76               no = group},
77     club = {'always',
78             no = group},
79     craft = {'always',
80              no = group},
81     emergency = {'always',
82                  no = group,
83                  yes = group,
84                  fire_hydrant = group},
85     healthcare = {'fallback',
86                   yes = group,
87                   no = group},
88     highway = {'always',
89                no = group,
90                turning_circle = group,
91                mini_roundabout = group,
92                noexit = group,
93                crossing = group,
94                give_way = group,
95                stop = group,
96                turning_loop = group,
97                passing_place = group,
98                street_lamp = 'named',
99                traffic_signals = 'named'},
100     historic = {'always',
101                 yes = group,
102                 no = group},
103     junction = {'fallback',
104                 no = group},
105     leisure = {'always',
106                nature_reserve = 'fallback',
107                no = group},
108     man_made = {pier = 'always',
109                 tower = 'always',
110                 bridge = 'always',
111                 works = 'named',
112                 water_tower = 'always',
113                 dyke = 'named',
114                 adit = 'named',
115                 lighthouse = 'always',
116                 watermill = 'always',
117                 tunnel = 'always'},
118     military = {'always',
119                 yes = group,
120                 no = group},
121     office = {'always',
122               no = group},
123     railway = {'named',
124                rail = group,
125                no = group,
126                abandoned = group,
127                disused = group,
128                razed = group,
129                level_crossing = group,
130                switch = group,
131                signal = group,
132                buffer_stop = group},
133     shop = {'always',
134             no = group},
135     tourism = {'always',
136                no = group,
137                yes = group},
138     tunnel = {'named_with_key',
139               no = group}
140 } end
141
142 module.MAIN_TAGS_STREETS = {}
143
144 module.MAIN_TAGS_STREETS.default = {
145     place = {square = 'always'},
146     highway = {motorway = 'always',
147                trunk = 'always',
148                primary = 'always',
149                secondary = 'always',
150                tertiary = 'always',
151                unclassified = 'always',
152                residential = 'always',
153                road = 'always',
154                living_street = 'always',
155                pedestrian = 'always',
156                service = 'named',
157                cycleway = 'named',
158                path = 'named',
159                footway = 'named',
160                steps = 'named',
161                bridleway = 'named',
162                track = 'named',
163                motorway_link = 'named',
164                trunk_link = 'named',
165                primary_link = 'named',
166                secondary_link = 'named',
167                tertiary_link = 'named'}
168 }
169
170 module.MAIN_TAGS_STREETS.car = {
171     place = {square = 'always'},
172     highway = {motorway = 'always',
173                trunk = 'always',
174                primary = 'always',
175                secondary = 'always',
176                tertiary = 'always',
177                unclassified = 'always',
178                residential = 'always',
179                road = 'always',
180                living_street = 'always',
181                service = 'always',
182                track = 'always',
183                motorway_link = 'always',
184                trunk_link = 'always',
185                primary_link = 'always',
186                secondary_link = 'always',
187                tertiary_link = 'always'}
188 }
189
190 module.MAIN_TAGS_STREETS.all = {
191     place = {square = 'always'},
192     highway = {motorway = 'always',
193                trunk = 'always',
194                primary = 'always',
195                secondary = 'always',
196                tertiary = 'always',
197                unclassified = 'always',
198                residential = 'always',
199                road = 'always',
200                living_street = 'always',
201                pedestrian = 'always',
202                service = 'always',
203                cycleway = 'always',
204                path = 'always',
205                footway = 'always',
206                steps = 'always',
207                bridleway = 'always',
208                track = 'always',
209                motorway_link = 'always',
210                trunk_link = 'always',
211                primary_link = 'always',
212                secondary_link = 'always',
213                tertiary_link = 'always'}
214 }
215
216
217 -- name tags
218
219 module.NAME_TAGS = {}
220
221 module.NAME_TAGS.core = {main = {'name', 'name:*',
222                                  'int_name', 'int_name:*',
223                                  'nat_name', 'nat_name:*',
224                                  'reg_name', 'reg_name:*',
225                                  'loc_name', 'loc_name:*',
226                                  'old_name', 'old_name:*',
227                                  'alt_name', 'alt_name:*', 'alt_name_*',
228                                  'official_name', 'official_name:*',
229                                  'place_name', 'place_name:*',
230                                  'short_name', 'short_name:*'},
231                          extra = {'ref', 'int_ref', 'nat_ref', 'reg_ref',
232                                   'loc_ref', 'old_ref', 'ISO3166-2'}
233                         }
234 module.NAME_TAGS.address = {house = {'addr:housename'}}
235 module.NAME_TAGS.poi = {extra = {'ref', 'int_ref', 'nat_ref', 'reg_ref',
236                                        'loc_ref', 'old_ref',
237                                        'iata', 'icao',
238                                        'ISO3166-2'}}
239
240 -- Address tagging
241
242 module.ADDRESS_TAGS = {}
243
244 module.ADDRESS_TAGS.core = { extra = {'addr:*', 'is_in:*', 'tiger:county'},
245                              postcode = {'postal_code', 'postcode', 'addr:postcode',
246                                          'tiger:zip_left', 'tiger:zip_right'},
247                              country = {'country_code', 'ISO3166-1',
248                                         'addr:country_code', 'is_in:country_code',
249                                         'addr:country', 'is_in:country'}
250                            }
251
252 module.ADDRESS_TAGS.houses = { main = {'addr:housenumber',
253                                        'addr:conscriptionnumber',
254                                        'addr:streetnumber'},
255                                interpolation = {'addr:interpolation'}
256                              }
257
258 -- Ignored tags (prefiltered away)
259
260 module.IGNORE_KEYS = {}
261
262 module.IGNORE_KEYS.metatags = {'note', 'note:*', 'source', 'source:*', '*source',
263                                'attribution', 'comment', 'fixme', 'created_by',
264                                'tiger:cfcc', 'tiger:reviewed', 'nysgissam:*',
265                                'NHD:*', 'nhd:*', 'gnis:*', 'geobase:*', 'yh:*',
266                                'osak:*', 'naptan:*', 'CLC:*', 'import', 'it:fvg:*',
267                                'lacounty:*', 'ref:linz:*',
268                                'ref:bygningsnr', 'ref:ruian:*', 'building:ruian:type',
269                                'type',
270                                'is_in:postcode'}
271 module.IGNORE_KEYS.name = {'*:prefix', '*:suffix', 'name:prefix:*', 'name:suffix:*',
272                            'name:etymology', 'name:signed', 'name:botanical'}
273 module.IGNORE_KEYS.address = {'addr:street:*', 'addr:city:*', 'addr:district:*',
274                               'addr:province:*', 'addr:subdistrict:*', 'addr:place:*',
275                               'addr:TW:dataset'}
276
277 -- Extra tags (prefiltered away)
278
279 module.EXTRATAGS = {}
280
281 module.EXTRATAGS.required = {'wikipedia', 'wikipedia:*', 'wikidata', 'capital'}
282
283 return module