]> git.openstreetmap.org Git - nominatim.git/blob - settings/import-extratags.lua
Import documentation: reverse-only only a little faster import [skip ci]
[nominatim.git] / settings / import-extratags.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     highway = {'always',
11                street_lamp = 'named',
12                traffic_signals = 'named',
13                service = 'named',
14                cycleway = 'named',
15                path = 'named',
16                footway = 'named',
17                steps = 'named',
18                bridleway = 'named',
19                track = 'named',
20                motorway_link = 'named',
21                trunk_link = 'named',
22                primary_link = 'named',
23                secondary_link = 'named',
24                tertiary_link = 'named'},
25     railway = 'named',
26     man_made = {'none',
27                 pier = 'always',
28                 tower = 'always',
29                 bridge = 'always',
30                 works = 'named',
31                 water_tower = 'always',
32                 dyke = 'named',
33                 lighthouse = 'always',
34                 watermill = 'always',
35                 tunnel = 'always'},
36     aerialway = 'always',
37     boundary = {'named',
38                 postal_code = 'always'},
39     aeroway = 'always',
40     amenity = 'always',
41     club = 'always',
42     craft = 'always',
43     junction = 'fallback',
44     landuse = 'fallback',
45     leisure = {'always',
46                nature_reserve = 'fallback'},
47     office = 'always',
48     mountain_pass = 'always',
49     shop = 'always',
50     tourism = 'always',
51     bridge = 'named_with_key',
52     tunnel = 'named_with_key',
53     waterway = 'named',
54     place = 'always'
55 }
56
57 flex.set_prefilters{delete_keys = {'note', 'note:*', 'source', '*source', 'attribution',
58                                    'comment', 'fixme', 'FIXME', 'created_by', 'NHD:*',
59                                    'nhd:*', 'gnis:*', 'geobase:*', 'KSJ2:*', 'yh:*',
60                                    'osak:*', 'naptan:*', 'CLC:*', 'import', 'it:fvg:*',
61                                    'type', 'lacounty:*', 'ref:ruian:*', 'building:ruian:type',
62                                    'ref:linz:*', 'is_in:postcode'},
63                     delete_tags = {emergency = {'yes', 'no', 'fire_hydrant'},
64                                    historic = {'yes', 'no'},
65                                    military = {'yes', 'no'},
66                                    natural = {'yes', 'no', 'coastline'},
67                                    highway = {'no', 'turning_circle', 'mini_roundabout',
68                                               'noexit', 'crossing', 'give_way', 'stop'},
69                                    railway = {'level_crossing', 'no', 'rail', 'switch',
70                                               'abandoned', 'signal', 'buffer_stop', 'razed'},
71                                    aerialway = {'pylon', 'no'},
72                                    aeroway = {'no'},
73                                    amenity = {'no', 'parking_space', 'parking_entrance'},
74                                    club = {'no'},
75                                    craft = {'no'},
76                                    leisure = {'no'},
77                                    office = {'no'},
78                                    mountain_pass = {'no'},
79                                    shop = {'no'},
80                                    tourism = {'yes', 'no'},
81                                    bridge = {'no'},
82                                    tunnel = {'no'},
83                                    waterway = {'riverbank'},
84                                    building = {'no'},
85                                    boundary = {'place', 'land_area'}},
86                     extra_keys = {'*:prefix', '*:suffix', 'name:prefix:*', 'name:suffix:*',
87                                'name:etymology', 'name:signed', 'name:botanical',
88                                'wikidata', '*:wikidata',
89                                '*:wikipedia', 'brand:wikipedia:*',
90                                'addr:street:name', 'addr:street:type'}
91                    }
92
93 flex.set_name_tags{main = {'name', 'name:*',
94                           'int_name', 'int_name:*',
95                           'nat_name', 'nat_name:*',
96                           'reg_name', 'reg_name:*',
97                           'loc_name', 'loc_name:*',
98                           'old_name', 'old_name:*',
99                           'alt_name', 'alt_name:*', 'alt_name_*',
100                           'official_name', 'official_name:*',
101                           'place_name', 'place_name:*',
102                           'short_name', 'short_name:*', 'brand'},
103                    extra = {'ref', 'int_ref', 'nat_ref', 'reg_ref',
104                             'loc_ref', 'old_ref',
105                             'iata', 'icao', 'pcode', 'pcode:*', 'ISO3166-2'},
106                    house = {'addr:housename'}
107                   }
108
109 flex.set_address_tags{main = {'addr:housenumber',
110                               'addr:conscriptionnumber',
111                               'addr:streetnumber'},
112                       extra = {'addr:*', 'is_in:*', 'tiger:county'},
113                       postcode = {'postal_code', 'postcode', 'addr:postcode',
114                                   'tiger:zip_left', 'tiger:zip_right'},
115                       country = {'country_code', 'ISO3166-1',
116                                  'addr:country_code', 'is_in:country_code',
117                                  'addr:country', 'is_in:country'},
118                       interpolation = {'addr:interpolation'}
119                      }
120
121
122 flex.set_unused_handling{delete_keys = {'tiger:*'}}
123
124 return flex