1 -- Defines defaults used in the topic definitions.
5 -- Customized main tag filter functions
7 local EXCLUDED_FOOTWAYS = { sidewalk = 1, crossing = 1, link = 1, traffic_aisle }
9 local function filter_footways(place)
10 if place.has_name then
11 local footway = place.object.tags.footway
12 if footway == nil or EXCLUDED_FOOTWAYS[footway] ~= 1 then
19 -- Main tag definition
23 module.MAIN_TAGS.admin = {
24 boundary = {administrative = 'named'},
25 landuse = {residential = 'fallback',
27 farmyard = 'fallback',
28 industrial = 'fallback',
29 commercial = 'fallback',
30 allotments = 'fallback',
32 place = {county = 'always',
34 municipality = 'always',
42 subdivision = 'always',
43 allotments = 'always',
44 neighbourhood = 'always',
46 isolated_dwelling = 'always',
48 city_block = 'always',
52 module.MAIN_TAGS.all_boundaries = {
56 postal_code = 'always'},
61 module.MAIN_TAGS.natural = {
63 riverbank = 'delete'},
69 mountain_pass = {'always',
73 module.MAIN_TAGS_POIS = function (group)
74 group = group or 'delete'
76 aerialway = {'always',
83 parking_space = group,
84 parking_entrance = group,
85 waste_disposal = group,
86 hunting_stand = group},
87 building = {'fallback',
89 bridge = {'named_with_key',
95 emergency = {'always',
98 fire_hydrant = group},
99 healthcare = {'fallback',
104 turning_circle = group,
105 mini_roundabout = group,
110 turning_loop = group,
111 passing_place = group,
112 street_lamp = 'named',
113 traffic_signals = 'named'},
114 historic = {'always',
117 junction = {'fallback',
120 nature_reserve = 'fallback',
122 man_made = {pier = 'always',
126 water_tower = 'always',
129 lighthouse = 'always',
130 watermill = 'always',
132 military = {'always',
143 level_crossing = group,
146 buffer_stop = group},
152 tunnel = {'named_with_key',
156 module.MAIN_TAGS_STREETS = {}
158 module.MAIN_TAGS_STREETS.default = {
159 place = {square = 'always'},
160 highway = {motorway = 'always',
163 secondary = 'always',
165 unclassified = 'always',
166 residential = 'always',
168 living_street = 'always',
169 pedestrian = 'always',
173 footway = filter_footways,
177 motorway_link = 'named',
178 trunk_link = 'named',
179 primary_link = 'named',
180 secondary_link = 'named',
181 tertiary_link = 'named'}
184 module.MAIN_TAGS_STREETS.car = {
185 place = {square = 'always'},
186 highway = {motorway = 'always',
189 secondary = 'always',
191 unclassified = 'always',
192 residential = 'always',
194 living_street = 'always',
197 motorway_link = 'always',
198 trunk_link = 'always',
199 primary_link = 'always',
200 secondary_link = 'always',
201 tertiary_link = 'always'}
204 module.MAIN_TAGS_STREETS.all = {
205 place = {square = 'always'},
206 highway = {motorway = 'always',
209 secondary = 'always',
211 unclassified = 'always',
212 residential = 'always',
214 living_street = 'always',
215 pedestrian = 'always',
221 bridleway = 'always',
223 motorway_link = 'always',
224 trunk_link = 'always',
225 primary_link = 'always',
226 secondary_link = 'always',
227 tertiary_link = 'always'}
233 module.NAME_TAGS = {}
235 module.NAME_TAGS.core = {main = {'name', 'name:*',
236 'int_name', 'int_name:*',
237 'nat_name', 'nat_name:*',
238 'reg_name', 'reg_name:*',
239 'loc_name', 'loc_name:*',
240 'old_name', 'old_name:*',
241 'alt_name', 'alt_name:*', 'alt_name_*',
242 'official_name', 'official_name:*',
243 'place_name', 'place_name:*',
244 'short_name', 'short_name:*'},
245 extra = {'ref', 'int_ref', 'nat_ref', 'reg_ref',
246 'loc_ref', 'old_ref', 'ISO3166-2'}
248 module.NAME_TAGS.address = {house = {'addr:housename'}}
249 module.NAME_TAGS.poi = {extra = {'ref', 'int_ref', 'nat_ref', 'reg_ref',
250 'loc_ref', 'old_ref',
256 module.ADDRESS_TAGS = {}
258 module.ADDRESS_TAGS.core = { extra = {'addr:*', 'is_in:*', 'tiger:county'},
259 postcode = {'postal_code', 'postcode', 'addr:postcode',
260 'tiger:zip_left', 'tiger:zip_right'},
261 country = {'country_code', 'ISO3166-1',
262 'addr:country_code', 'is_in:country_code',
263 'addr:country', 'is_in:country'}
266 module.ADDRESS_TAGS.houses = { main = {'addr:housenumber',
267 'addr:conscriptionnumber',
268 'addr:streetnumber'},
269 interpolation = {'addr:interpolation'}
272 -- Ignored tags (prefiltered away)
274 module.IGNORE_KEYS = {}
276 module.IGNORE_KEYS.metatags = {'note', 'note:*', 'source', 'source:*', '*source',
277 'attribution', 'comment', 'fixme', 'created_by',
278 'tiger:cfcc', 'tiger:reviewed', 'nysgissam:*',
279 'NHD:*', 'nhd:*', 'gnis:*', 'geobase:*', 'yh:*',
280 'osak:*', 'naptan:*', 'CLC:*', 'import', 'it:fvg:*',
281 'lacounty:*', 'ref:linz:*',
282 'ref:bygningsnr', 'ref:ruian:*', 'building:ruian:type',
285 module.IGNORE_KEYS.name = {'*:prefix', '*:suffix', 'name:prefix:*', 'name:suffix:*',
286 'name:etymology', 'name:signed', 'name:botanical'}
287 module.IGNORE_KEYS.address = {'addr:street:*', 'addr:city:*', 'addr:district:*',
288 'addr:province:*', 'addr:subdistrict:*', 'addr:place:*',
291 -- Extra tags (prefiltered away)
293 module.EXTRATAGS = {}
295 module.EXTRATAGS.required = {'wikipedia', 'wikipedia:*', 'wikidata', 'capital'}