-
Notifications
You must be signed in to change notification settings - Fork 10
/
mapCat.py
201 lines (186 loc) · 5.02 KB
/
mapCat.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
def mapCategories(categoryName):
keys = [{"name": "Restaurant",
"categories": "100-1000",
},
{"name": "Coffee-Tea",
"categories": "100-1100",
},
{"name": "Nightlife-Entertainment",
"categories": "200-2000",
},
{"name": "Cinema",
"categories": "200-2100",
},
{"name": "Theatre, Music and Culture",
"categories": "200-2200",
},
{"name": "Landmark-Attraction",
"categories": "300-3000",
},
{"name": "Museum",
"categories": "300-3100",
},
{"name": "Religious Place",
"categories": "300-3200",
},
{"name": "Body of Water",
"categories": "350-3500",
},
{"name": "Mountain or Hill",
"categories": "350-3510",
},
{"name": "Undersea Feature",
"categories": "350-3520",
},
{"name": "Forest, Heath or Other Vegetation",
"categories": "350-3522",
},
{"name": "Natural and Geographical",
"categories": "350-3550",
},
{"name": "Airport",
"categories": "400-4000",
},
{"name": "Public Transport",
"categories": "400-4100",
},
{"name": "Cargo Transportation",
"categories": "400-4200",
},
{"name": "Rest Area",
"categories": "400-4300",
},
{"name": "Hotel-Motel",
"categories": "500-5000",
},
{"name": "Lodging",
"categories": "500-5100",
},
{"name": "Outdoor-Recreation",
"categories": "550-5510",
},
{"name": "Leisure",
"categories": "550-5520",
},
{"name": "Convenience Store",
"categories": "600-6000",
},
{"name": "Mall-Shopping Complex",
"categories": "600-6100",
},
{"name": "Department Store",
"categories": "600-6200",
},
{"name": "Food and Drink",
"categories": "600-6300",
},
{"name": "Drugstore or Pharmacy",
"categories": "600-6400",
},
{"name": "Electronics",
"categories": "600-6500",
},
{"name": "Hardware, House and Garden",
"categories": "600-6600",
},
{"name": "Bookstore",
"categories": "600-6700",
},
{"name": "Clothing and Accessories",
"categories": "600-6800",
},
{"name": "Consumer Goods",
"categories": "600-6900",
},
{"name": "Hair and Beauty",
"categories": "600-6950",
},
{"name": "Banking",
"categories": "700-7000",
},
{"name": "ATM",
"categories": "700-7010",
},
{"name": "Money-Cash Services",
"categories": "700-7050",
},
{"name": "Communication-Media",
"categories": "700-7100",
},
{"name": "Commercial Services",
"categories": "700-7200",
},
{"name": "Business-Industry",
"categories": "700-7250",
},
{"name": "Police-Fire-Emergency",
"categories": "700-7300",
},
{"name": "Consumer Services",
"categories": "700-7400",
},
{"name": "Post Office",
"categories": "700-7450",
},
{"name": "Tourist Information",
"categories": "700-7460",
},
{"name": "Fueling Station",
"categories": "700-7600",
},
{"name": "Car Dealer-Sales",
"categories": "700-7800",
},
{"name": "Car Repair-Service",
"categories": "700-7850",
},
{"name": "Car Rental",
"categories": "700-7851",
},
{"name": "Truck-Semi Dealer-Services",
"categories": "700-7900",
},
{"name": "Hospital or Health Care Facility",
"categories": "800-8000",
},
{"name": "Government or Community Facility",
"categories": "800-8100",
},
{"name": "Education Facility",
"categories": "800-8200",
},
{"name": "Library",
"categories": "800-8300",
},
{"name": "Event Spaces",
"categories": "800-8400",
},
{"name": "Parking",
"categories": "800-8500",
},
{"name": "Sports Facility-Venue",
"categories": "800-8600",
},
{"name": "Facilities",
"categories": "800-8700",
},
{"name": "City, Town or Village",
"categories": "900-9100",
},
{"name": "Outdoor Area-Complex",
"categories": "900-9200",
},
{"name": "Building",
"categories": "900-9300",
},
{"name": "Administrative Region-Streets",
"categories": "900-9400",
},
]
for itemID in keys:
if itemID["name"] == categoryName:
categoryID = itemID["categories"]
break
else:
categoryID=""
return categoryID