e32 commited on
Commit
02af17a
·
verified ·
1 Parent(s): e95f494

Add semantic map style JSON for reproducible mask generation

Browse files
Files changed (2) hide show
  1. README.md +8 -4
  2. docs/semantic_map_style.json +306 -0
README.md CHANGED
@@ -105,10 +105,14 @@ export GOOGLE_MAPS_STYLE_MAP_ID="your-map-style-id"
105
  ```
106
 
107
  > **Recreating the semantic map style.** The per-class semantic masks are parsed from a
108
- > *custom-styled* Google map in which each land-cover class is rendered in a fixed colour. You
109
- > must recreate this map style in your own Google Cloud account and set its map-style ID above.
110
- > The exact class→colour mapping is defined in `CLASS_COLORS_HEX` at the top of
111
- > `Obtain_corresponding_map_signed.py` reproduce those colours in your style.
 
 
 
 
112
 
113
  > By using these scripts you are making **live calls to the Google Maps Platform under your own
114
  > account**, and you are responsible for complying with the
 
105
  ```
106
 
107
  > **Recreating the semantic map style.** The per-class semantic masks are parsed from a
108
+ > *custom-styled* Google map in which each land-cover class is rendered in a fixed colour. We
109
+ > provide the exact style definition at [`docs/semantic_map_style.json`](docs/semantic_map_style.json).
110
+ > To reproduce it, open the Google Cloud console, go to **Map Styles → Create style → JSON tab →
111
+ > Upload JSON File**, upload this file, and save. The style is built on the *light* base map,
112
+ > which supplies the default water / vegetation / land colours, while building, railway and road
113
+ > surfaces are recoloured explicitly. Set the resulting **Map ID** as `GOOGLE_MAPS_STYLE_MAP_ID`.
114
+ > The class→colour mapping consumed by the parser is in `CLASS_COLORS_HEX` at the top of
115
+ > `Obtain_corresponding_map_signed.py`.
116
 
117
  > By using these scripts you are making **live calls to the Google Maps Platform under your own
118
  > account**, and you are responsible for complying with the
docs/semantic_map_style.json ADDED
@@ -0,0 +1,306 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "variant": "light",
3
+ "styles": [
4
+ {
5
+ "id": "infrastructure.building",
6
+ "geometry": {
7
+ "visible": true,
8
+ "fillOpacity": 1,
9
+ "fillColor": "#ff0000",
10
+ "strokeOpacity": 1,
11
+ "strokeColor": "#000000"
12
+ },
13
+ "label": {
14
+ "visible": false
15
+ }
16
+ },
17
+ {
18
+ "id": "infrastructure.building.commercial",
19
+ "geometry": {
20
+ "visible": {
21
+ "z00": true,
22
+ "z16": true,
23
+ "z17": true
24
+ },
25
+ "fillOpacity": 1,
26
+ "fillColor": "#ff0000",
27
+ "strokeOpacity": 1,
28
+ "strokeColor": "#000000"
29
+ }
30
+ },
31
+ {
32
+ "id": "infrastructure.businessCorridor",
33
+ "geometry": {
34
+ "visible": false,
35
+ "fillOpacity": 1,
36
+ "fillColor": "#000000"
37
+ }
38
+ },
39
+ {
40
+ "id": "infrastructure.railwayTrack.commercial",
41
+ "geometry": {
42
+ "visible": true,
43
+ "fillOpacity": 1,
44
+ "fillColor": "#0073ff",
45
+ "strokeOpacity": 0,
46
+ "strokeColor": "#c7cacf"
47
+ }
48
+ },
49
+ {
50
+ "id": "infrastructure.railwayTrack.commuter",
51
+ "geometry": {
52
+ "visible": true,
53
+ "fillOpacity": 1,
54
+ "fillColor": "#0073ff"
55
+ }
56
+ },
57
+ {
58
+ "id": "infrastructure.roadNetwork.noTraffic",
59
+ "geometry": {
60
+ "visible": false
61
+ },
62
+ "label": {
63
+ "visible": false
64
+ }
65
+ },
66
+ {
67
+ "id": "infrastructure.roadNetwork.road",
68
+ "label": {
69
+ "visible": false
70
+ }
71
+ },
72
+ {
73
+ "id": "infrastructure.roadNetwork.roadDetail",
74
+ "label": {
75
+ "visible": false
76
+ }
77
+ },
78
+ {
79
+ "id": "infrastructure.roadNetwork.roadDetail.marking.crosswalk",
80
+ "geometry": {
81
+ "fillOpacity": 1,
82
+ "fillColor": "#ffffff"
83
+ }
84
+ },
85
+ {
86
+ "id": "infrastructure.roadNetwork.roadDetail.sidewalk",
87
+ "geometry": {
88
+ "visible": true,
89
+ "fillOpacity": 1,
90
+ "fillColor": "#7d7d7d"
91
+ }
92
+ },
93
+ {
94
+ "id": "infrastructure.roadNetwork.roadDetail.surface",
95
+ "geometry": {
96
+ "visible": true,
97
+ "fillOpacity": 1,
98
+ "fillColor": "#1e1e1e"
99
+ },
100
+ "label": {
101
+ "visible": false
102
+ }
103
+ },
104
+ {
105
+ "id": "infrastructure.roadNetwork.roadShield",
106
+ "label": {
107
+ "visible": false
108
+ }
109
+ },
110
+ {
111
+ "id": "infrastructure.roadNetwork.roadSign",
112
+ "label": {
113
+ "visible": false
114
+ }
115
+ },
116
+ {
117
+ "id": "infrastructure.transitStation",
118
+ "label": {
119
+ "visible": false
120
+ }
121
+ },
122
+ {
123
+ "id": "infrastructure.urbanArea",
124
+ "geometry": {
125
+ "visible": false
126
+ }
127
+ },
128
+ {
129
+ "id": "natural.archipelago",
130
+ "label": {
131
+ "visible": false
132
+ }
133
+ },
134
+ {
135
+ "id": "natural.water",
136
+ "label": {
137
+ "visible": false
138
+ }
139
+ },
140
+ {
141
+ "id": "pointOfInterest",
142
+ "geometry": {
143
+ "visible": false
144
+ },
145
+ "label": {
146
+ "visible": false
147
+ }
148
+ },
149
+ {
150
+ "id": "pointOfInterest.emergency",
151
+ "geometry": {
152
+ "visible": false
153
+ },
154
+ "label": {
155
+ "visible": false
156
+ }
157
+ },
158
+ {
159
+ "id": "pointOfInterest.entertainment",
160
+ "label": {
161
+ "visible": false
162
+ }
163
+ },
164
+ {
165
+ "id": "pointOfInterest.foodAndDrink",
166
+ "label": {
167
+ "visible": false
168
+ }
169
+ },
170
+ {
171
+ "id": "pointOfInterest.landmark",
172
+ "label": {
173
+ "visible": false
174
+ }
175
+ },
176
+ {
177
+ "id": "pointOfInterest.lodging",
178
+ "label": {
179
+ "visible": false
180
+ }
181
+ },
182
+ {
183
+ "id": "pointOfInterest.other",
184
+ "geometry": {
185
+ "visible": false
186
+ },
187
+ "label": {
188
+ "visible": false
189
+ }
190
+ },
191
+ {
192
+ "id": "pointOfInterest.recreation",
193
+ "geometry": {
194
+ "visible": false
195
+ },
196
+ "label": {
197
+ "visible": false
198
+ }
199
+ },
200
+ {
201
+ "id": "pointOfInterest.recreation.park",
202
+ "geometry": {
203
+ "visible": true
204
+ }
205
+ },
206
+ {
207
+ "id": "pointOfInterest.retail",
208
+ "label": {
209
+ "visible": false
210
+ }
211
+ },
212
+ {
213
+ "id": "pointOfInterest.retail.grocery",
214
+ "label": {
215
+ "visible": false
216
+ }
217
+ },
218
+ {
219
+ "id": "pointOfInterest.retail.shopping",
220
+ "label": {
221
+ "visible": false
222
+ }
223
+ },
224
+ {
225
+ "id": "pointOfInterest.service",
226
+ "label": {
227
+ "visible": false
228
+ }
229
+ },
230
+ {
231
+ "id": "pointOfInterest.transit",
232
+ "geometry": {
233
+ "visible": false
234
+ },
235
+ "label": {
236
+ "visible": false
237
+ }
238
+ },
239
+ {
240
+ "id": "political",
241
+ "geometry": {
242
+ "visible": false
243
+ },
244
+ "label": {
245
+ "visible": false
246
+ }
247
+ },
248
+ {
249
+ "id": "political.border",
250
+ "geometry": {
251
+ "visible": false
252
+ },
253
+ "label": {
254
+ "visible": false
255
+ }
256
+ },
257
+ {
258
+ "id": "political.city",
259
+ "label": {
260
+ "visible": false
261
+ }
262
+ },
263
+ {
264
+ "id": "political.countryOrRegion",
265
+ "label": {
266
+ "visible": false
267
+ }
268
+ },
269
+ {
270
+ "id": "political.landParcel",
271
+ "geometry": {
272
+ "visible": false
273
+ }
274
+ },
275
+ {
276
+ "id": "political.neighborhood",
277
+ "label": {
278
+ "visible": false
279
+ }
280
+ },
281
+ {
282
+ "id": "political.reservation",
283
+ "geometry": {
284
+ "visible": false
285
+ },
286
+ "label": {
287
+ "visible": false
288
+ }
289
+ },
290
+ {
291
+ "id": "political.stateOrProvince",
292
+ "geometry": {
293
+ "visible": false
294
+ },
295
+ "label": {
296
+ "visible": false
297
+ }
298
+ },
299
+ {
300
+ "id": "political.sublocality",
301
+ "label": {
302
+ "visible": false
303
+ }
304
+ }
305
+ ]
306
+ }