]> git.openstreetmap.org Git - nominatim.git/blob - settings/import-street.lua
also switch unit tests for cli
[nominatim.git] / settings / import-street.lua
1 local flex = require('flex-base')
2
3 flex.set_main_tags{
4     highway = {'always',
5                street_lamp = 'named',
6                traffic_signals = 'named',
7                service = 'named',
8                cycleway = 'named',
9                path = 'named',
10                footway = 'named',
11                steps = 'named',
12                bridleway = 'named',
13                track = 'named',
14                motorway_link = 'named',
15                trunk_link = 'named',
16                primary_link = 'named',
17                secondary_link = 'named',
18                tertiary_link = 'named'},
19     boundary = {administrative = 'named',
20                 postal_code = 'always'},
21     landuse = 'fallback',
22     place = 'always'
23 }
24
25 flex.set_prefilters{delete_keys = {'building', 'source',
26                                    'addr:housenumber', 'addr:street',
27                                    'source', '*source', 'type',
28                                    'is_in:postcode', '*:wikidata', '*:wikipedia',
29                                    '*:prefix', '*:suffix', 'name:prefix:*', 'name:suffix:*',
30                                    'name:etymology', 'name:signed', 'name:botanical',
31                                    'addr:street:name', 'addr:street:type'},
32                     delete_tags = {highway = {'no', 'turning_circle', 'mini_roundabout',
33                                               'noexit', 'crossing', 'give_way', 'stop'},
34                                    landuse = {'cemetry', 'no'},
35                                    boundary = {'place'}},
36                     extra_keys = {'wikipedia', 'wikipedia:*', 'wikidata', 'capital', 'area'}
37                    }
38
39 flex.set_name_tags{main = {'name', 'name:*',
40                           'int_name', 'int_name:*',
41                           'nat_name', 'nat_name:*',
42                           'reg_name', 'reg_name:*',
43                           'loc_name', 'loc_name:*',
44                           'old_name', 'old_name:*',
45                           'alt_name', 'alt_name:*', 'alt_name_*',
46                           'official_name', 'official_name:*',
47                           'place_name', 'place_name:*',
48                           'short_name', 'short_name:*'},
49                    extra = {'ref', 'int_ref', 'nat_ref', 'reg_ref',
50                             'loc_ref', 'old_ref',
51                             'iata', 'icao', 'pcode', 'pcode:*', 'ISO3166-2'}
52                   }
53
54 flex.set_address_tags{main = {'addr:housenumber',
55                               'addr:conscriptionnumber',
56                               'addr:streetnumber'},
57                       extra = {'addr:*', 'is_in:*', 'tiger:county'},
58                       postcode = {'postal_code', 'postcode', 'addr:postcode',
59                                   'tiger:zip_left', 'tiger:zip_right'},
60                       country = {'country_code', 'ISO3166-1',
61                                  'addr:country_code', 'is_in:country_code',
62                                  'addr:country', 'is_in:country'},
63                       interpolation = {'addr:interpolation'},
64                       postcode_fallback = false
65                      }
66
67 flex.set_unused_handling{extra_keys = {'place'}}
68
69 return flex