]> git.openstreetmap.org Git - nominatim.git/blob - settings/import-admin.lua
fix handling of unused extra tags
[nominatim.git] / settings / import-admin.lua
1 local flex = require('flex-base')
2
3 flex.set_main_tags{
4     boundary = {administrative = 'named'},
5     landuse = 'fallback',
6     place = 'always'
7 }
8
9 flex.set_prefilters{delete_keys = {'building', 'source', 'highway',
10                                    'addr:housenumber', 'addr:street', 'addr:city',
11                                    'source', '*source', 'type',
12                                    'is_in:postcode', '*:wikidata', '*:wikipedia',
13                                    '*:prefix', '*:suffix', 'name:prefix:*', 'name:suffix:*',
14                                    'name:etymology', 'name:signed', 'name:botanical',
15                                    'addr:street:name', 'addr:street:type'},
16                     delete_tags = {landuse = {'cemetry', 'no'},
17                                    boundary = {'place'}},
18                     extra_keys = {'wikipedia', 'wikipedia:*', 'wikidata', 'capital'}
19                    }
20
21 flex.set_name_tags{main = {'name', 'name:*',
22                           'int_name', 'int_name:*',
23                           'nat_name', 'nat_name:*',
24                           'reg_name', 'reg_name:*',
25                           'loc_name', 'loc_name:*',
26                           'old_name', 'old_name:*',
27                           'alt_name', 'alt_name:*', 'alt_name_*',
28                           'official_name', 'official_name:*',
29                           'place_name', 'place_name:*',
30                           'short_name', 'short_name:*'},
31                    extra = {'ref', 'int_ref', 'nat_ref', 'reg_ref',
32                             'loc_ref', 'old_ref',
33                             'iata', 'icao', 'pcode', 'pcode:*', 'ISO3166-2'}
34                   }
35
36 flex.set_address_tags{extra = {'addr:*', 'is_in:*'},
37                       postcode = {'postal_code', 'postcode', 'addr:postcode'},
38                       country = {'country_code', 'ISO3166-1',
39                                  'addr:country_code', 'is_in:country_code',
40                                  'addr:country', 'is_in:country'},
41                       postcode_fallback = false
42                      }
43
44 flex.set_unused_handling{extra_keys = {'place'}}
45
46 return flex