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