]> git.openstreetmap.org Git - nominatim.git/blob - settings/import-full.lua
Merge pull request #3021 from lonvia/readd-postalcode-relations
[nominatim.git] / settings / import-full.lua
1 local flex = require('flex-base')
2
3 flex.set_main_tags{
4     building = 'fallback',
5     emergency = 'always',
6     healthcare = 'fallback',
7     historic = 'always',
8     military = 'always',
9     natural = 'named',
10     landuse = 'named',
11     highway = {'always',
12                street_lamp = 'named',
13                traffic_signals = 'named',
14                service = 'named',
15                cycleway = 'named',
16                path = 'named',
17                footway = 'named',
18                steps = 'named',
19                bridleway = 'named',
20                track = 'named',
21                motorway_link = 'named',
22                trunk_link = 'named',
23                primary_link = 'named',
24                secondary_link = 'named',
25                tertiary_link = 'named'},
26     railway = 'named',
27     man_made = 'always',
28     aerialway = 'always',
29     boundary = {'named',
30                 postal_code = 'always'},
31     aeroway = 'always',
32     amenity = 'always',
33     club = 'always',
34     craft = 'always',
35     junction = 'fallback',
36     landuse = 'fallback',
37     leisure = 'always',
38     office = 'always',
39     mountain_pass = 'always',
40     shop = 'always',
41     tourism = 'always',
42     bridge = 'named_with_key',
43     tunnel = 'named_with_key',
44     waterway = 'named',
45     place = 'always'
46 }
47
48 flex.set_prefilters{delete_keys = {'note', 'note:*', 'source', '*source', 'attribution',
49                                    'comment', 'fixme', 'FIXME', 'created_by', 'NHD:*',
50                                    'nhd:*', 'gnis:*', 'geobase:*', 'KSJ2:*', 'yh:*',
51                                    'osak:*', 'naptan:*', 'CLC:*', 'import', 'it:fvg:*',
52                                    'type', 'lacounty:*', 'ref:ruian:*', 'building:ruian:type',
53                                    'ref:linz:*', 'is_in:postcode',
54                                    '*:prefix', '*:suffix', 'name:prefix:*', 'name:suffix:*',
55                                    'name:etymology', 'name:signed', 'name:botanical',
56                                    '*:wikidata', '*:wikipedia', 'brand:wikipedia:*',
57                                    'addr:street:name', 'addr:street:type'},
58                     delete_tags = {emergency = {'yes', 'no', 'fire_hydrant'},
59                                    historic = {'yes', 'no'},
60                                    military = {'yes', 'no'},
61                                    natural = {'yes', 'no', 'coastline'},
62                                    highway = {'no', 'turning_circle', 'mini_roundabout',
63                                               'noexit', 'crossing', 'give_way', 'stop'},
64                                    railway = {'level_crossing', 'no', 'rail'},
65                                    man_made = {'survey_point', 'cutline'},
66                                    aerialway = {'pylon', 'no'},
67                                    aeroway = {'no'},
68                                    amenity = {'no'},
69                                    club = {'no'},
70                                    craft = {'no'},
71                                    leisure = {'no'},
72                                    office = {'no'},
73                                    mountain_pass = {'no'},
74                                    shop = {'no'},
75                                    tourism = {'yes', 'no'},
76                                    bridge = {'no'},
77                                    tunnel = {'no'},
78                                    waterway = {'riverbank'},
79                                    building = {'no'},
80                                    boundary = {'place'}},
81                     extra_keys = {'wikidata', 'wikipedia', 'wikipedia:*'}
82                    }
83
84 flex.set_name_tags{main = {'name', 'name:*',
85                           'int_name', 'int_name:*',
86                           'nat_name', 'nat_name:*',
87                           'reg_name', 'reg_name:*',
88                           'loc_name', 'loc_name:*',
89                           'old_name', 'old_name:*',
90                           'alt_name', 'alt_name:*', 'alt_name_*',
91                           'official_name', 'official_name:*',
92                           'place_name', 'place_name:*',
93                           'short_name', 'short_name:*', 'brand'},
94                    extra = {'ref', 'int_ref', 'nat_ref', 'reg_ref',
95                             'loc_ref', 'old_ref',
96                             'iata', 'icao', 'pcode', 'pcode:*', 'ISO3166-2'},
97                    house = {'addr:housename'}
98                   }
99
100 flex.set_address_tags{main = {'addr:housenumber',
101                               'addr:conscriptionnumber',
102                               'addr:streetnumber'},
103                       extra = {'addr:*', 'is_in:*', 'tiger:county'},
104                       postcode = {'postal_code', 'postcode', 'addr:postcode',
105                                   'tiger:zip_left', 'tiger:zip_right'},
106                       country = {'country_code', 'ISO3166-1',
107                                  'addr:country_code', 'is_in:country_code',
108                                  'addr:country', 'is_in:country'},
109                       interpolation = {'addr:interpolation'}
110                      }
111
112
113 flex.set_unused_handling{extra_keys = {'place'}}
114
115 return flex