]> git.openstreetmap.org Git - nominatim.git/blob - settings/import-admin.lua
adapt BDD tests to changed simplification
[nominatim.git] / settings / import-admin.lua
1 local flex = require('flex-base')
2
3 flex.set_main_tags{
4     boundary = {administrative = 'named'},
5     landuse = {residential = 'fallback',
6                farm = 'fallback',
7                farmyard = 'fallback',
8                industrial = 'fallback',
9                commercial = 'fallback',
10                allotments = 'fallback',
11                retail = 'fallback'},
12     place = {county = 'always',
13              district = 'always',
14              municipality = 'always',
15              city = 'always',
16              town = 'always',
17              borough = 'always',
18              village = 'always',
19              suburb = 'always',
20              hamlet = 'always',
21              croft = 'always',
22              subdivision = 'always',
23              allotments = 'always',
24              neighbourhood = 'always',
25              quarter = 'always',
26              isolated_dwelling = 'always',
27              farm = 'always',
28              city_block = 'always',
29              mountain_pass = 'always',
30              square = 'always',
31              locality = 'always'}
32 }
33
34 flex.set_prefilters{delete_keys = {'building', 'source', 'highway',
35                                    'addr:housenumber', 'addr:street', 'addr:city',
36                                    'addr:interpolation',
37                                    'source', '*source', 'type',
38                                    'is_in:postcode', '*:wikidata', '*:wikipedia',
39                                    '*:prefix', '*:suffix', 'name:prefix:*', 'name:suffix:*',
40                                    'name:etymology', 'name:signed', 'name:botanical',
41                                    'addr:street:name', 'addr:street:type'},
42                     delete_tags = {landuse = {'cemetry', 'no'},
43                                    boundary = {'place'}},
44                     extra_keys = {'wikipedia', 'wikipedia:*', 'wikidata', 'capital'}
45                    }
46
47 flex.set_name_tags{main = {'name', 'name:*',
48                           'int_name', 'int_name:*',
49                           'nat_name', 'nat_name:*',
50                           'reg_name', 'reg_name:*',
51                           'loc_name', 'loc_name:*',
52                           'old_name', 'old_name:*',
53                           'alt_name', 'alt_name:*', 'alt_name_*',
54                           'official_name', 'official_name:*',
55                           'place_name', 'place_name:*',
56                           'short_name', 'short_name:*'},
57                    extra = {'ref', 'int_ref', 'nat_ref', 'reg_ref',
58                             'loc_ref', 'old_ref',
59                             'iata', 'icao', 'pcode', 'pcode:*', 'ISO3166-2'}
60                   }
61
62 flex.set_address_tags{extra = {'addr:*', 'is_in:*'},
63                       postcode = {'postal_code', 'postcode', 'addr:postcode'},
64                       country = {'country_code', 'ISO3166-1',
65                                  'addr:country_code', 'is_in:country_code',
66                                  'addr:country', 'is_in:country'},
67                       postcode_fallback = false
68                      }
69
70 flex.set_unused_handling{extra_keys = {'place'}}
71
72 return flex