-
Notifications
You must be signed in to change notification settings - Fork 1
/
CE-db-migrations.sql
672 lines (664 loc) · 43.4 KB
/
CE-db-migrations.sql
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
-- Disable foreign key checks
SET FOREIGN_KEY_CHECKS=0;
CREATE DATABASE caixa_enginyers;
USE caixa_enginyers;
CREATE TABLE cache_distance (
key_dist varchar(255) UNIQUE NOT NULL PRIMARY KEY,
content FLOAT NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_spanish_ci;
CREATE TABLE municipis (
id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
lot int NOT NULL,
bloc int NOT NULL,
comarca varchar(255) NOT NULL,
codi_ine int NOT NULL,
municipi varchar(255) NOT NULL,
pob_total_num int NOT NULL,
estancia_min time NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_spanish_ci;
-- GEO Separat de la taula general per optimitzar consultes. A més, donat que com que creem index espacial, el valor no podrà ser NULL, cosa que no permetria inserir inicialment els valors a municipis, ja que no disposem de les coordenades encara.
CREATE TABLE municipis_geo (
id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
municipi_id int NOT NULL UNIQUE,
geopoint POINT SRID 4326 NOT NULL,
SPATIAL INDEX idx_municipis_geo (geopoint),
CONSTRAINT municipis_geo_fk_1 FOREIGN KEY (municipi_id) REFERENCES municipis (id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_spanish_ci;
-- Enable foreign key checks
SET FOREIGN_KEY_CHECKS=1;
-- Adding the data, which has been extracted from the provided "Dades_Municipis.xlsx" file.
INSERT INTO municipis (lot, bloc, comarca, codi_ine, municipi, pob_total_num, estancia_min) VALUES
-- Ruta 2 (Barcelona)
(2, 1, 'Anoia', 8036, 'Calonge de Segarra', 195, '00:30:00'),
(2, 1, 'Anoia', 8060, 'Castellfollit de Riubregós', 159, '00:30:00'),
(2, 1, 'Anoia', 8170, 'Prats de Rei', 554, '01:00:00'),
(2, 1, 'Anoia', 8176, 'Pujalt', 204, '00:30:00'),
(2, 1, 'Anoia', 8189, 'Sant Pere Sallavinera', 167, '00:30:00'),
(2, 1, 'Anoia', 8228, 'Sant Martí Sesgueioles', 361, '01:00:00'),
(2, 1, 'Anoia', 8008, 'Argençola', 216, '00:30:00'),
(2, 1, 'Anoia', 8071, 'Copons', 333, '01:00:00'),
(2, 1, 'Anoia', 8103, 'Jorba', 806, '01:00:00'),
(2, 1, 'Anoia', 8133, 'Montmaneu', 166, '00:30:00'),
(2, 1, 'Anoia', 8185, 'Rubió', 244, '00:30:00'),
(2, 1, 'Anoia', 8297, 'Veciana', 182, '00:30:00'),
(2, 1, 'Anoia', 8021, 'Bellprat', 74, '00:30:00'),
(2, 1, 'Anoia', 8025, 'Bruc', 2218, '01:00:00'),
(2, 1, 'Anoia', 8063, 'Castellolí', 636, '01:00:00'),
(2, 1, 'Anoia', 8152, 'Orpí', 159, '00:30:00'),
(2, 1, 'Anoia', 8257, 'Santa Maria de Miralles', 138, '00:30:00'),
(2, 1, 'Anoia', 8028, 'Cabrera d''Anoia', 1606, '01:00:00'),
(2, 1, 'Anoia', 8286, 'Torre de Claramunt', 3966, '01:00:00'),
(2, 1, 'Anoia', 8292, 'Vallbona d''Anoia', 1387, '01:00:00'),
(2, 1, 'Anoia', 8104, 'Llacuna', 942, '01:00:00'),
(2, 1, 'Conca Barberà', 43046, 'Conesa', 109, '00:30:00'),
(2, 1, 'Conca Barberà', 43073, 'Llorac', 96, '00:30:00'),
(2, 1, 'Conca Barberà', 43101, 'Passanant i Belltall', 170, '00:30:00'),
(2, 1, 'Conca Barberà', 43105, 'Piles', 224, '00:30:00'),
(2, 1, 'Conca Barberà', 43143, 'Savallà del Comtat', 52, '00:30:00'),
(2, 1, 'Conca Barberà', 43159, 'Vallfogona de Riucorb', 89, '00:30:00'),
(2, 1, 'Conca Barberà', 43061, 'Forès', 48, '00:30:00'),
(2, 1, 'Conca Barberà', 43130, 'Rocafort de Queralt', 241, '00:30:00'),
(2, 1, 'Anoia', 8048, 'Carme', 754, '01:00:00'),
(2, 2, 'Alt Penedès', 8122, 'Mediona', 2517, '01:00:00'),
(2, 2, 'Alt Penedès', 8085, 'Font-rubí', 1446, '01:00:00'),
(2, 2, 'Alt Penedès', 8168, 'Pontons', 507, '01:00:00'),
(2, 2, 'Alt Penedès', 8288, 'Torrelles de Foix', 2557, '01:00:00'),
(2, 2, 'Alt Penedès', 8027, 'Cabanyes', 999, '01:00:00'),
(2, 2, 'Alt Penedès', 8154, 'Pacs del Penedès', 935, '01:00:00'),
(2, 2, 'Alt Penedès', 8206, 'Sant Cugat Sesgarrigues', 1009, '01:00:00'),
(2, 2, 'Alt Penedès', 8249, 'Santa Fe del Penedès', 370, '01:00:00'),
(2, 2, 'Alt Penedès', 8304, 'Vilobí del Penedès', 1.13, '01:00:00'),
(2, 2, 'Alt Penedès', 8058, 'Castellet i la Gornal', 2474, '01:00:00'),
(2, 2, 'Baix Penedès', 43002, 'Albinyana', 2581, '01:00:00'),
(2, 2, 'Baix Penedès', 43030, 'Bonastre', 742, '01:00:00'),
(2, 2, 'Baix Penedès', 43140, 'Santa Oliva', 3.56, '01:00:00'),
(2, 2, 'Garraf', 8148, 'Olivella', 4339, '01:00:00'),
(2, 2, 'Alt Penedès', 8146, 'Olesa de Bonesvalls', 2016, '01:00:00'),
(2, 2, 'Alt Penedès', 8174, 'Puigdàlber', 555, '01:00:00'),
(2, 2, 'Alt Penedès', 8222, 'Sant Llorenç d''Hortons', 2503, '01:00:00'),
(2, 2, 'Alt Penedès', 8273, 'Subirats', 3241, '01:00:00'),
(2, 2, 'Alt Penedès', 8287, 'Torrelavit', 1457, '01:00:00'),
(2, 2, 'Baix Penedès', 43079, 'Masllorenç', 547, '01:00:00'),
(2, 2, 'Baix Penedès', 43090, 'Montmell', 1863, '01:00:00'),
(2, 2, 'Tarragonès', 43135, 'Salomó', 543, '01:00:00'),
(2, 2, 'Tarragonès', 43164, 'Vespella de Gaià', 496, '01:00:00'),
(2, 3, 'Conca Barberà', 43029, 'Blancafort', 394, '01:00:00'),
(2, 3, 'Conca Barberà', 43107, 'Pira', 489, '01:00:00'),
(2, 3, 'Conca Barberà', 43146, 'Senan', 44, '00:30:00'),
(2, 3, 'Alt Camp', 43001, 'Aiguamúrcia', 961, '01:00:00'),
(2, 3, 'Alt Camp', 43036, 'Cabra del Camp', 1254, '01:00:00'),
(2, 3, 'Alt Camp', 43120, 'Querol', 572, '01:00:00'),
(2, 3, 'Conca Barberà', 43141, 'Pontils', 133, '00:30:00'),
(2, 3, 'Alt Camp', 43059, 'Figuerola del Camp', 332, '01:00:00'),
(2, 3, 'Alt Camp', 43089, 'Montferri', 419, '01:00:00'),
(2, 3, 'Alt Camp', 43132, 'Rodonyà', 506, '01:00:00'),
(2, 3, 'Conca Barberà', 43158, 'Vallclara', 88, '00:30:00'),
(2, 3, 'Conca Barberà', 43168, 'Vilanova de Prades', 107, '00:30:00'),
(2, 3, 'Alt Camp', 43091, 'Mont-ral', 173, '00:30:00'),
(2, 3, 'Alt Camp', 43124, 'Riba', 552, '01:00:00'),
(2, 3, 'Conca Barberà', 43172, 'Vilaverd', 453, '01:00:00'),
(2, 3, 'Alt Camp', 43066, 'Garidells', 196, '00:30:00'),
(2, 3, 'Alt Camp', 43080, 'Masó', 285, '01:00:00'),
(2, 3, 'Alt Camp', 43083, 'Milà', 189, '00:30:00'),
(2, 3, 'Alt Camp', 43160, 'Vallmoll', 1882, '01:00:00'),
(2, 3, 'Alt Camp', 43010, 'Alió', 496, '01:00:00'),
(2, 3, 'Alt Camp', 43034, 'Bràfim', 687, '01:00:00'),
(2, 3, 'Alt Camp', 43119, 'Puigpelat', 1199, '01:00:00'),
(2, 3, 'Alt Camp', 43165, 'Vilabella', 711, '01:00:00'),
(2, 3, 'Alt Camp', 43098, 'Nulles', 541, '01:00:00'),
(2, 3, 'Alt Camp', 43134, 'Rourell', 395, '01:00:00'),
(2, 4, 'Baix Camp', 43017, 'Argentera', 126, '00:30:00'),
(2, 4, 'Baix Camp', 43033, 'Botarell', 1102, '01:00:00'),
(2, 4, 'Baix Camp', 43045, 'Colldejou', 172, '00:30:00'),
(2, 4, 'Baix Camp', 43118, 'Pratdip', 693, '01:00:00'),
(2, 4, 'Baix Camp', 43127, 'Riudecanyes', 1279, '01:00:00'),
(2, 4, 'Baix Camp', 43167, 'Vilanova d''Escornalbou', 594, '01:00:00'),
(2, 4, 'Baix Camp', 43007, 'Aleixar', 924, '01:00:00'),
(2, 4, 'Baix Camp', 43009, 'Alforja', 1928, '01:00:00'),
(2, 4, 'Baix Camp', 43053, 'Duesaigües', 232, '00:30:00'),
(2, 4, 'Baix Camp', 43081, 'Maspujols', 859, '01:00:00'),
(2, 4, 'Baix Camp', 43128, 'Riudecols', 1198, '01:00:00'),
(2, 4, 'Baix Camp', 43015, 'Arbolí', 122, '00:30:00'),
(2, 4, 'Baix Camp', 43039, 'Capafonts', 121, '00:30:00'),
(2, 4, 'Baix Camp', 43057, 'Febró', 39, '00:30:00'),
(2, 4, 'Baix Camp', 43169, 'Vilaplana', 540, '01:00:00'),
(2, 4, 'Baix Camp', 43003, 'Albiol', 528, '01:00:00'),
(2, 4, 'Baix Camp', 43011, 'Almoster', 1334, '01:00:00'),
(2, 4, 'Tarragonès', 43103, 'Perafort', 1292, '01:00:00'),
(2, 4, 'Tarragonès', 43109, 'Pobla de Mafumet', 4052, '01:00:00'),
(2, 4, 'Tarragonès', 43166, 'Vilallonga del Camp', 2398, '01:00:00'),
(2, 4, 'Tarragonès', 43097, 'Nou de Gaià', 636, '01:00:00'),
(2, 4, 'Tarragonès', 43126, 'Riera de Gaià', 1752, '01:00:00'),
(2, 4, 'Tarragonès', 43043, 'Catllar', 4921, '01:00:00'),
(2, 4, 'Tarragonès', 43144, 'Secuita', 1765, '01:00:00'),
(2, 4, 'Tarragonès', 43122, 'Renau', 152, '00:30:00'),
-- Ruta 4 (Girona)
(4, 4, 'Gironès', 17038, 'Campllong', 535, '01:00:00'),
(4, 4, 'Gironès', 17090, 'Llambilles', 731, '01:00:00'),
(4, 4, 'Gironès', 17157, 'Sant Andreu Salou', 162, '00:30:00'),
(4, 4, 'Selva', 17101, 'Massanes', 825, '01:00:00'),
(4, 4, 'Selva', 17159, 'Sant Feliu de Buixalleu', 839, '01:00:00'),
(4, 4, 'Gironès', 17002, 'Aiguaviva', 780, '01:00:00'),
(4, 4, 'Gironès', 17172, 'Sant Martí de Llémena', 679, '01:00:00'),
(4, 4, 'Selva', 17028, 'Brunyola i Sant Martí Sapresa', 388, '01:00:00'),
(4, 4, 'Selva', 17116, 'Osor', 423, '01:00:00'),
(4, 4, 'Selva', 17194, 'Susqueda', 96, '00:30:00'),
(4, 4, 'Pla Estany', 17174, 'Sant Miquel de Campmajor', 239, '00:30:00'),
(4, 2, 'Garrotxa', 17105, 'Mieres', 341, '01:00:00'),
(4, 2, 'Garrotxa', 17183, 'Sant Aniol de Finestres', 363, '01:00:00'),
(4, 4, 'Gironès', 17040, 'Canet d''Adri', 750, '01:00:00'),
(4, 4, 'Pla Estany', 17035, 'Camós', 715, '01:00:00'),
(4, 3, 'Baix Empordà', 17121, 'Palau-sator', 327, '01:00:00'),
(4, 3, 'Baix Empordà', 17144, 'Regencós', 271, '01:00:00'),
(4, 3, 'Baix Empordà', 17209, 'Vall-llobrega', 926, '01:00:00'),
(4, 3, 'Baix Empordà', 17901, 'Cruïlles, Monells i Sant Sadurní de l''Heura', 1338, '01:00:00'),
(4, 3, 'Baix Empordà', 17902, 'Forallac', 1765, '01:00:00'),
(4, 3, 'Baix Empordà', 17126, 'Parlavà', 415, '01:00:00'),
(4, 3, 'Baix Empordà', 17130, 'Pera', 438, '01:00:00'),
(4, 3, 'Baix Empordà', 17153, 'Rupià', 300, '01:00:00'),
(4, 4, 'Gironès', 17087, 'Juià', 334, '01:00:00'),
(4, 4, 'Gironès', 17097, 'Madremanya', 302, '01:00:00'),
(4, 4, 'Gironès', 17173, 'Sant Martí Vell', 261, '01:00:00'),
(4, 3, 'Baix Empordà', 17057, 'Corçà', 1268, '01:00:00'),
(4, 3, 'Baix Empordà', 17068, 'Foixà', 288, '01:00:00'),
(4, 3, 'Baix Empordà', 17070, 'Fontanilles', 163, '00:30:00'),
(4, 3, 'Baix Empordà', 17081, 'Gualta', 439, '01:00:00'),
(4, 3, 'Baix Empordà', 17191, 'Serra de Daró', 233, '00:30:00'),
(4, 3, 'Baix Empordà', 17204, 'Ullà', 1195, '01:00:00'),
(4, 3, 'Baix Empordà', 17055, 'Colomers', 204, '00:30:00'),
(4, 3, 'Baix Empordà', 17076, 'Garrigoles', 177, '00:30:00'),
(4, 3, 'Baix Empordà', 17195, 'Tallada d''Empordà', 480, '01:00:00'),
(4, 3, 'Baix Empordà', 17232, 'Vilopriu', 223, '00:30:00'),
(4, 4, 'Gironès', 17050, 'Cervià de Ter', 999, '01:00:00'),
(4, 4, 'Pla Estany', 17123, 'Palol de Revardit', 457, '01:00:00'),
(4, 3, 'Alt Empordà', 17210, 'Ventalló', 911, '01:00:00'),
(4, 3, 'Alt Empordà', 17217, 'Viladamat', 479, '01:00:00'),
(4, 3, 'Baix Empordà', 17004, 'Albons', 797, '01:00:00'),
(4, 3, 'Baix Empordà', 17018, 'Bellcaire d''Empordà', 713, '01:00:00'),
(4, 1, 'Alt Empordà', 17175, 'Sant Miquel de Fluvià', 808, '01:00:00'),
(4, 1, 'Alt Empordà', 17198, 'Torroella de Fluvià', 741, '01:00:00'),
(4, 1, 'Alt Empordà', 17222, 'Vilaür', 162, '00:30:00'),
(4, 1, 'Alt Empordà', 17225, 'Vilamacolum', 386, '01:00:00'),
(4, 4, 'Pla Estany', 17218, 'Vilademuls', 840, '01:00:00'),
(4, 2, 'Garrotxa', 17098, 'Maià de Montcal', 462, '01:00:00'),
(4, 2, 'Garrotxa', 17162, 'Sant Ferriol', 256, '01:00:00'),
(4, 4, 'Pla Estany', 17058, 'Crespià', 276, '01:00:00'),
(4, 4, 'Pla Estany', 17065, 'Esponellà', 489, '01:00:00'),
(4, 4, 'Pla Estany', 17071, 'Fontcoberta', 1466, '01:00:00'),
(4, 2, 'Garrotxa', 17010, 'Argelaguer', 439, '01:00:00'),
(4, 2, 'Garrotxa', 17149, 'Riudaura', 511, '01:00:00'),
(4, 2, 'Garrotxa', 17165, 'Sant Jaume de Llierca', 842, '01:00:00'),
(4, 2, 'Garrotxa', 17208, 'Vall de Bianya', 1345, '01:00:00'),
(4, 2, 'Alt Empordà', 17003, 'Albanyà', 180, '00:30:00'),
(4, 2, 'Garrotxa', 17109, 'Montagut i Oix', 958, '01:00:00'),
(4, 2, 'Garrotxa', 17154, 'Sales de Llierca', 169, '00:30:00'),
(4, 2, 'Garrotxa', 17200, 'Tortellà', 823, '01:00:00'),
(4, 1, 'Alt Empordà', 17026, 'Borrassà', 776, '01:00:00'),
(4, 1, 'Alt Empordà', 17052, 'Siurana', 178, '00:30:00'),
(4, 1, 'Alt Empordà', 17075, 'Garrigàs', 458, '01:00:00'),
(4, 2, 'Alt Empordà', 17111, 'Navata', 1465, '01:00:00'),
(4, 1, 'Alt Empordà', 17005, 'Far d''Empordà', 625, '01:00:00'),
(4, 1, 'Alt Empordà', 17074, 'Fortià', 778, '01:00:00'),
(4, 1, 'Alt Empordà', 17151, 'Riumors', 244, '00:30:00'),
(4, 1, 'Alt Empordà', 17182, 'Santa Llogaia d''Àlguema', 379, '01:00:00'),
(4, 1, 'Alt Empordà', 17230, 'Vila-sacra', 785, '01:00:00'),
(4, 1, 'Alt Empordà', 17030, 'Cabanes', 949, '01:00:00'),
(4, 1, 'Alt Empordà', 17128, 'Pau', 579, '01:00:00'),
(4, 1, 'Alt Empordà', 17129, 'Pedret i Marzà', 181, '00:30:00'),
(4, 1, 'Alt Empordà', 17188, 'Selva de Mar', 220, '00:30:00'),
(4, 1, 'Alt Empordà', 17012, 'Avinyonet de Puigventós', 1676, '01:00:00'),
(4, 2, 'Alt Empordà', 17031, 'Cabanelles', 279, '01:00:00'),
(4, 2, 'Alt Empordà', 17088, 'Lladó', 827, '01:00:00'),
(4, 2, 'Alt Empordà', 17228, 'Vilanant', 401, '01:00:00'),
(4, 2, 'Alt Empordà', 17029, 'Boadella i les Escaules', 258, '01:00:00'),
(4, 2, 'Alt Empordà', 17051, 'Cistella', 307, '01:00:00'),
(4, 2, 'Alt Empordà', 17171, 'Sant Llorenç de la Muga', 267, '01:00:00'),
(4, 2, 'Alt Empordà', 17196, 'Terrades', 345, '01:00:00'),
(4, 1, 'Alt Empordà', 17100, 'Masarac', 294, '01:00:00'),
(4, 1, 'Alt Empordà', 17106, 'Mollet de Peralada', 202, '00:30:00'),
(4, 2, 'Alt Empordà', 17042, 'Capmany', 672, '01:00:00'),
(4, 2, 'Alt Empordà', 17135, 'Pont de Molins', 542, '01:00:00'),
(4, 1, 'Alt Empordà', 17064, 'Espolla', 408, '01:00:00'),
(4, 1, 'Alt Empordà', 17143, 'Rabós', 210, '00:30:00'),
(4, 1, 'Alt Empordà', 17227, 'Vilamaniscle', 204, '00:30:00'),
(4, 2, 'Alt Empordà', 17014, 'Vajol', 87, '00:30:00'),
(4, 2, 'Alt Empordà', 17041, 'Cantallops', 330, '01:00:00'),
(4, 1, 'Alt Empordà', 17115, 'Ordis', 373, '01:00:00'),
(4, 1, 'Alt Empordà', 17119, 'Palau de Santa Eulàlia', 115, '00:30:00'),
(4, 1, 'Alt Empordà', 17136, 'Pontós', 274, '01:00:00'),
(4, 1, 'Alt Empordà', 17221, 'Vilafant', 5562, '01:00:00'),
(4, 1, 'Alt Empordà', 17226, 'Vilamalla', 1166, '01:00:00'),
(4, 2, 'Alt Empordà', 17234, 'Biure', 249, '00:30:00'),
(4, 2, 'Garrotxa', 17021, 'Beuda', 202, '00:30:00'),
(4, 3, 'Baix Empordà', 17085, 'Jafre', 386, '01:00:00'),
(4, 3, 'Baix Empordà', 17197, 'Torrent', 166, '00:30:00'),
(4, 3, 'Baix Empordà', 17203, 'Ultramort', 224, '00:30:00'),
(4, 3, 'Baix Empordà', 17205, 'Ullastret', 250, '01:00:00'),
(4, 4, 'Gironès', 17168, 'Sant Joan de Mollet', 515, '01:00:00'),
(4, 4, 'Gironès', 17216, 'Viladasens', 216, '00:30:00'),
(4, 4, 'Selva', 8082, 'Fogars de la Selva', 1564, '01:00:00'),
-- Ruta 5 (Tarragona)
(5, 1, 'Bages', 8242, 'Marganell', 282, '01:00:00'),
(5, 1, 'Baix Llobregat', 8066, 'Castellví de Rosanes', 2096, '01:00:00'),
(5, 1, 'Baix Llobregat', 8069, 'Collbató', 4726, '01:00:00'),
(5, 1, 'Vallès Occidental', 8179, 'Rellinars', 915, '01:00:00'),
(5, 1, 'Vallès Occidental', 8290, 'Ullastrell', 2139, '01:00:00'),
(5, 1, 'Maresme', 8153, 'Òrrius', 793, '01:00:00'),
(5, 1, 'Vallès Oriental', 8256, 'Santa Maria de Martorelles', 889, '01:00:00'),
(5, 1, 'Vallès Oriental', 8294, 'Vallgorguina', 3144, '01:00:00'),
(5, 1, 'Vallès Oriental', 8306, 'Vilalba Sasserra', 748, '01:00:00'),
(5, 1, 'Vallès Oriental', 8039, 'Campins', 557, '01:00:00'),
(5, 1, 'Vallès Oriental', 8042, 'Cànoves i Samalús', 3289, '01:00:00'),
(5, 1, 'Vallès Oriental', 8081, 'Fogars de Montclús', 493, '01:00:00'),
(5, 1, 'Vallès Oriental', 8097, 'Gualba', 161, '01:00:00'),
(5, 1, 'Vallès Oriental', 8234, 'Sant Pere de Vilamajor', 4815, '01:00:00'),
(5, 1, 'Bages', 8059, 'Castellfollit del Boix', 460, '01:00:00'),
(5, 1, 'Bages', 8061, 'Castellgalí', 2236, '01:00:00'),
(5, 1, 'Bages', 8139, 'Mura', 232, '00:30:00'),
(5, 1, 'Bages', 8277, 'Talamanca', 219, '00:30:00'),
(5, 1, 'Vallès Occidental', 8223, 'Sant Llorenç Savall', 2524, '01:00:00'),
(5, 1, 'Vallès Occidental', 8087, 'Gallifa', 186, '00:30:00'),
(5, 1, 'Vallès Oriental', 8276, 'Tagamanent', 340, '01:00:00'),
(5, 1, 'Vallès Oriental', 8134, 'Figaró-Montmany', 1108, '01:00:00'),
(5, 1, 'Vallès Oriental', 8137, 'Montseny', 370, '01:00:00'),
(5, 1, 'Vallès Oriental', 8207, 'Sant Esteve de Palautordera', 3043, '01:00:00'),
(5, 2, 'Bages', 8002, 'Aguilar de Segarra', 287, '01:00:00'),
(5, 2, 'Bages', 8084, 'Fonollosa', 1546, '01:00:00'),
(5, 2, 'Bages', 8178, 'Rajadell', 545, '01:00:00'),
(5, 2, 'Bages', 8062, 'Castellnou de Bages', 1431, '01:00:00'),
(5, 2, 'Bages', 8229, 'Sant Mateu de Bages', 628, '01:00:00'),
(5, 2, 'Moianès', 8095, 'Granera', 80, '00:30:00'),
(5, 2, 'Moianès', 8128, 'Monistrol de Calders', 742, '01:00:00'),
(5, 2, 'Moianès', 8239, 'Sant Quirze Safaja', 672, '01:00:00'),
(5, 2, 'Moianès', 8034, 'Calders', 1101, '01:00:00'),
(5, 2, 'Moianès', 8055, 'Castellcir', 778, '01:00:00'),
(5, 2, 'Moianès', 8070, 'Collsuspina', 398, '01:00:00'),
(5, 2, 'Moianès', 8079, 'Estany', 391, '01:00:00'),
(5, 2, 'Bages', 8212, 'Sant Feliu Sasserra', 611, '01:00:00'),
(5, 2, 'Berguedà', 8308, 'Viver i Serrateix', 166, '00:30:00'),
(5, 2, 'Berguedà', 8188, 'Sagàs', 157, '00:30:00'),
(5, 2, 'Berguedà', 8255, 'Santa Maria de Merlès', 184, '00:30:00'),
(5, 2, 'Lluçanès', 8149, 'Olost', 1206, '01:00:00'),
(5, 2, 'Lluçanès', 8151, 'Oristà', 573, '01:00:00'),
(5, 2, 'Lluçanès', 8225, 'Sant Martí d''Albars', 119, '00:30:00'),
(5, 2, 'Lluçanès', 8271, 'Sobremunt', 83, '00:30:00'),
(5, 2, 'Berguedà', 8144, 'Olvan', 876, '01:00:00'),
(5, 2, 'Lluçanès', 8109, 'Lluçà', 279, '01:00:00'),
(5, 2, 'Lluçanès', 8160, 'Perafita', 418, '01:00:00'),
(5, 2, 'Lluçanès', 8004, 'Alpens', 281, '01:00:00'),
(5, 3, 'Osona', 8111, 'Malla', 272, '01:00:00'),
(5, 3, 'Osona', 8129, 'Muntanyola', 700, '01:00:00'),
(5, 3, 'Osona', 8083, 'Folgueroles', 2254, '01:00:00'),
(5, 3, 'Osona', 8246, 'Santa Eugènia de Berga', 2256, '01:00:00'),
(5, 3, 'Osona', 8247, 'Santa Eulàlia de Riuprimer', 1401, '01:00:00'),
(5, 3, 'Osona', 8303, 'Vilanova de Sau', 320, '01:00:00'),
(5, 3, 'Osona', 8224, 'Sant Martí de Centelles', 1232, '01:00:00'),
(5, 3, 'Osona', 8100, 'Gurb', 2702, '01:00:00'),
(5, 3, 'Osona', 8116, 'Masies de Roda', 733, '01:00:00'),
(5, 3, 'Osona', 8243, 'Santa Cecília de Voltregà', 185, '00:30:00'),
(5, 3, 'Osona', 8280, 'Tavertet', 116, '00:30:00'),
(5, 3, 'Osona', 8901, 'Rupit i Pruit', 279, '01:00:00'),
(5, 3, 'Osona', 8199, 'Sant Bartomeu del Grau', 924, '01:00:00'),
(5, 3, 'Osona', 8117, 'Masies de Voltregà', 3133, '01:00:00'),
(5, 3, 'Osona', 8150, 'Orís', 347, '01:00:00'),
(5, 3, 'Osona', 8201, 'Sant Boi de Lluçanès', 575, '01:00:00'),
(5, 3, 'Osona', 8253, 'Santa Maria de Besora', 159, '00:30:00'),
(5, 3, 'Osona', 8265, 'Sant Vicenç de Torelló', 2077, '01:00:00'),
(5, 3, 'Osona', 8272, 'Sora', 219, '00:30:00'),
(5, 3, 'Osona', 17212, 'Vidrà', 181, '00:30:00'),
(5, 3, 'Osona', 8131, 'Montesquiu', 1059, '01:00:00'),
(5, 3, 'Osona', 8195, 'Sant Agustí de Lluçanès', 100, '00:30:00'),
(5, 3, 'Osona', 8275, 'Tavèrnoles', 329, '01:00:00'),
(5, 3, 'Osona', 8241, 'Sant Sadurní d''Osormort', 90, '00:30:00'),
(5, 3, 'Osona', 17063, 'Espinelves', 248, '00:30:00'),
(5, 3, 'Osona', 8026, 'Brull', 278, '01:00:00'),
(5, 4, 'Berguedà', 8078, 'Espunyola', 265, '01:00:00'),
(5, 4, 'Berguedà', 8130, 'Montclar', 136, '00:30:00'),
(5, 4, 'Berguedà', 8045, 'Capolat', 89, '00:30:00'),
(5, 4, 'Berguedà', 8050, 'Castellar del Riu', 175, '00:30:00'),
(5, 4, 'Berguedà', 8080, 'Fígols', 45, '00:30:00'),
(5, 4, 'Berguedà', 8142, 'Nou de Berguedà', 179, '00:30:00'),
(5, 4, 'Berguedà', 8177, 'Quar', 47, '00:30:00'),
(5, 4, 'Berguedà', 8299, 'Vilada', 439, '01:00:00'),
(5, 4, 'Ripollès', 17096, 'Llosses', 205, '00:30:00'),
(5, 4, 'Ripollès', 17170, 'Vallfogona de Ripollès', 222, '00:30:00'),
(5, 4, 'Berguedà', 8024, 'Borredà', 448, '01:00:00'),
(5, 4, 'Berguedà', 8057, 'Castell de l''Areny', 69, '00:30:00'),
(5, 4, 'Berguedà', 8216, 'Sant Jaume de Frontanyà', 31, '00:30:00'),
(5, 4, 'Berguedà', 8293, 'Vallcebre', 268, '01:00:00'),
(5, 4, 'Berguedà', 8903, 'Sant Julià de Cerdanyola', 241, '00:30:00'),
(5, 4, 'Berguedà', 8093, 'Gisclareny', 28, '00:30:00'),
(5, 4, 'Berguedà', 8190, 'Saldes', 298, '01:00:00'),
(5, 4, 'Berguedà', 25100, 'Gósol', 233, '00:30:00'),
(5, 4, 'Berguedà', 8052, 'Castellar de n''Hug', 176, '00:30:00'),
(5, 4, 'Ripollès', 17037, 'Campelles', 162, '00:30:00'),
(5, 4, 'Ripollès', 17080, 'Gombrèn', 200, '00:30:00'),
(5, 4, 'Ripollès', 17134, 'Planoles', 307, '01:00:00'),
(5, 4, 'Ripollès', 17201, 'Toses', 185, '00:30:00'),
(5, 4, 'Ripollès', 17192, 'Setcases', 200, '00:30:00'),
(5, 4, 'Ripollès', 17091, 'Llanars', 533, '01:00:00'),
(5, 4, 'Ripollès', 17107, 'Molló', 365, '01:00:00'),
(5, 4, 'Ripollès', 17112, 'Ogassa', 222, '00:30:00'),
(5, 4, 'Ripollès', 17224, 'Vilallonga de Ter', 410, '01:00:00'),
(5, 4, 'Ripollès', 17125, 'Pardines', 165, '00:30:00'),
(5, 4, 'Ripollès', 17043, 'Queralbs', 191, '00:30:00'),
-- Dades Rutes General
(2, -1, 'Barcelonès', '08001', 'Barcelona', 1664182, '00:00:00'), -- municipi_id 312
(4, -1, 'Gironès', '17079', 'Girona', 100266, '00:00:00'), -- municipi_id 313
(5, -1, 'Tarragonès', '43148', 'Tarragona', 132199, '00:00:00'); -- municipi_id 314
-- Add more data. This geopoints come from the Google Maps API. We generated them once and inserted the corresponding data to the DB. Only if the data needs to change we need to run the Google Maps API script again. We can use the following SQL to insert the data:
INSERT INTO municipis_geo (municipi_id, geopoint) VALUES
(1, ST_SRID(ST_GeomFromText('POINT(41.7626074 1.477615)'), 4326)),
(2, ST_SRID(ST_GeomFromText('POINT(41.77589330000001 1.4379359)'), 4326)),
(3, ST_SRID(ST_GeomFromText('POINT(41.7061422 1.5432601)'), 4326)),
(4, ST_SRID(ST_GeomFromText('POINT(41.7167335 1.4214255)'), 4326)),
(5, ST_SRID(ST_GeomFromText('POINT(41.7359957 1.5749439)'), 4326)),
(6, ST_SRID(ST_GeomFromText('POINT(41.7018468 1.4912187)'), 4326)),
(7, ST_SRID(ST_GeomFromText('POINT(41.6020116 1.4531355)'), 4326)),
(8, ST_SRID(ST_GeomFromText('POINT(41.6460892 1.5160212)'), 4326)),
(9, ST_SRID(ST_GeomFromText('POINT(41.600752 1.5499211)'), 4326)),
(10, ST_SRID(ST_GeomFromText('POINT(41.625864 1.4153882)'), 4326)),
(11, ST_SRID(ST_GeomFromText('POINT(41.6442798 1.5697589)'), 4326)),
(12, ST_SRID(ST_GeomFromText('POINT(41.6613587 1.4918235)'), 4326)),
(13, ST_SRID(ST_GeomFromText('POINT(41.5170582 1.4335027)'), 4326)),
(14, ST_SRID(ST_GeomFromText('POINT(41.5805938 1.7799034)'), 4326)),
(15, ST_SRID(ST_GeomFromText('POINT(41.598018 1.6997629)'), 4326)),
(16, ST_SRID(ST_GeomFromText('POINT(41.5186628 1.5756656)'), 4326)),
(17, ST_SRID(ST_GeomFromText('POINT(41.4947086 1.5267342)'), 4326)),
(18, ST_SRID(ST_GeomFromText('POINT(41.4936117 1.710095)'), 4326)),
(19, ST_SRID(ST_GeomFromText('POINT(41.5243069 1.6614947)'), 4326)),
(20, ST_SRID(ST_GeomFromText('POINT(41.5183109 1.7075563)'), 4326)),
(21, ST_SRID(ST_GeomFromText('POINT(41.4717328 1.5323625)'), 4326)),
(22, ST_SRID(ST_GeomFromText('POINT(41.51811310000001 1.2912103)'), 4326)),
(23, ST_SRID(ST_GeomFromText('POINT(41.55680330000001 1.3073147)'), 4326)),
(24, ST_SRID(ST_GeomFromText('POINT(41.5250051 1.2025207)'), 4326)),
(25, ST_SRID(ST_GeomFromText('POINT(41.4745038 1.2506002)'), 4326)),
(26, ST_SRID(ST_GeomFromText('POINT(41.5430061 1.2990359)'), 4326)),
(27, ST_SRID(ST_GeomFromText('POINT(41.5630393 1.2370723)'), 4326)),
(28, ST_SRID(ST_GeomFromText('POINT(41.4924767 1.23587)'), 4326)),
(29, ST_SRID(ST_GeomFromText('POINT(41.4785434 1.2812797)'), 4326)),
(30, ST_SRID(ST_GeomFromText('POINT(41.5318282 1.6203468)'), 4326)),
(31, ST_SRID(ST_GeomFromText('POINT(41.4798069 1.627507)'), 4326)),
(32, ST_SRID(ST_GeomFromText('POINT(41.4192167 1.6663523)'), 4326)),
(33, ST_SRID(ST_GeomFromText('POINT(41.4150084 1.5166301)'), 4326)),
(34, ST_SRID(ST_GeomFromText('POINT(41.3883146 1.5687229)'), 4326)),
(35, ST_SRID(ST_GeomFromText('POINT(41.3719419 1.6888257)'), 4326)),
(36, ST_SRID(ST_GeomFromText('POINT(41.3641966 1.6614947)'), 4326)),
(37, ST_SRID(ST_GeomFromText('POINT(41.3634661 1.7532732)'), 4326)),
(38, ST_SRID(ST_GeomFromText('POINT(41.3849334 1.7207335)'), 4326)),
(39, ST_SRID(ST_GeomFromText('POINT(41.3842357 1.6614947)'), 4326)),
(40, ST_SRID(ST_GeomFromText('POINT(41.2535361 1.5925029)'), 4326)),
(41, ST_SRID(ST_GeomFromText('POINT(41.2449807 1.486239)'), 4326)),
(42, ST_SRID(ST_GeomFromText('POINT(41.2210731 1.4399455)'), 4326)),
(43, ST_SRID(ST_GeomFromText('POINT(41.25331389999999 1.5521598)'), 4326)),
(44, ST_SRID(ST_GeomFromText('POINT(41.3102463 1.8114185)'), 4326)),
(45, ST_SRID(ST_GeomFromText('POINT(41.3561415 1.8611011)'), 4326)),
(46, ST_SRID(ST_GeomFromText('POINT(41.405007 1.6967245)'), 4326)),
(47, ST_SRID(ST_GeomFromText('POINT(41.465996 1.8230624)'), 4326)),
(48, ST_SRID(ST_GeomFromText('POINT(41.3847459 1.7971611)'), 4326)),
(49, ST_SRID(ST_GeomFromText('POINT(41.4464841 1.7300146)'), 4326)),
(50, ST_SRID(ST_GeomFromText('POINT(41.27029599999999 1.4162937)'), 4326)),
(51, ST_SRID(ST_GeomFromText('POINT(41.3414537 1.4918235)'), 4326)),
(52, ST_SRID(ST_GeomFromText('POINT(41.2287448 1.3746587)'), 4326)),
(53, ST_SRID(ST_GeomFromText('POINT(41.203398 1.3599568)'), 4326)),
(54, ST_SRID(ST_GeomFromText('POINT(41.4505405 1.1496969)'), 4326)),
(55, ST_SRID(ST_GeomFromText('POINT(41.4234114 1.202821)'), 4326)),
(56, ST_SRID(ST_GeomFromText('POINT(41.4700596 1.0875048)'), 4326)),
(57, ST_SRID(ST_GeomFromText('POINT(41.3296224 1.3586793)'), 4326)),
(58, ST_SRID(ST_GeomFromText('POINT(41.40391 1.2987349)'), 4326)),
(59, ST_SRID(ST_GeomFromText('POINT(41.4237177 1.3978848)'), 4326)),
(60, ST_SRID(ST_GeomFromText('POINT(41.47747570000001 1.3871751)'), 4326)),
(61, ST_SRID(ST_GeomFromText('POINT(41.3714085 1.2653356)'), 4326)),
(62, ST_SRID(ST_GeomFromText('POINT(41.2655762 1.3653115)'), 4326)),
(63, ST_SRID(ST_GeomFromText('POINT(41.277396 1.3999969)'), 4326)),
(64, ST_SRID(ST_GeomFromText('POINT(41.37668240000001 0.9805731999999998)'), 4326)),
(65, ST_SRID(ST_GeomFromText('POINT(41.3474337 0.9572794)'), 4326)),
(66, ST_SRID(ST_GeomFromText('POINT(41.2870198 1.0981137)'), 4326)),
(67, ST_SRID(ST_GeomFromText('POINT(41.3133712 1.3276422)'), 4326)),
(68, ST_SRID(ST_GeomFromText('POINT(41.3356934 1.1767007)'), 4326)),
(69, ST_SRID(ST_GeomFromText('POINT(41.20745489999999 1.2475459)'), 4326)),
(70, ST_SRID(ST_GeomFromText('POINT(41.2346147 1.2211737)'), 4326)),
(71, ST_SRID(ST_GeomFromText('POINT(41.3133712 1.3276422)'), 4326)),
(72, ST_SRID(ST_GeomFromText('POINT(41.2446134 1.2487963)'), 4326)),
(73, ST_SRID(ST_GeomFromText('POINT(41.2941858 1.3053578)'), 4326)),
(74, ST_SRID(ST_GeomFromText('POINT(41.2693132 1.3408979)'), 4326)),
(75, ST_SRID(ST_GeomFromText('POINT(41.2785243 1.3035514)'), 4326)),
(76, ST_SRID(ST_GeomFromText('POINT(41.2480007 1.3314874)'), 4326)),
(77, ST_SRID(ST_GeomFromText('POINT(41.2491051 1.2969289)'), 4326)),
(78, ST_SRID(ST_GeomFromText('POINT(41.2235994 1.2175396)'), 4326)),
(79, ST_SRID(ST_GeomFromText('POINT(41.13750599999999 0.9089423999999999)'), 4326)),
(80, ST_SRID(ST_GeomFromText('POINT(41.1352694 0.9898346000000001)'), 4326)),
(81, ST_SRID(ST_GeomFromText('POINT(41.0999205 0.8874774999999999)'), 4326)),
(82, ST_SRID(ST_GeomFromText('POINT(41.0509272 0.8713863)'), 4326)),
(83, ST_SRID(ST_GeomFromText('POINT(41.1292109 0.9623552)'), 4326)),
(84, ST_SRID(ST_GeomFromText('POINT(41.1130584 0.9372813)'), 4326)),
(85, ST_SRID(ST_GeomFromText('POINT(41.2010984 1.0457461)'), 4326)),
(86, ST_SRID(ST_GeomFromText('POINT(41.2066087 0.9533984)'), 4326)),
(87, ST_SRID(ST_GeomFromText('POINT(41.1458284 0.9301201)'), 4326)),
(88, ST_SRID(ST_GeomFromText('POINT(41.1816242 1.0451477)'), 4326)),
(89, ST_SRID(ST_GeomFromText('POINT(41.1683032 0.9765594)'), 4326)),
(90, ST_SRID(ST_GeomFromText('POINT(41.2426006 0.9487716)'), 4326)),
(91, ST_SRID(ST_GeomFromText('POINT(41.2954255 1.0272002)'), 4326)),
(92, ST_SRID(ST_GeomFromText('POINT(41.2775913 1.0043284)'), 4326)),
(93, ST_SRID(ST_GeomFromText('POINT(41.2288429 1.0337801)'), 4326)),
(94, ST_SRID(ST_GeomFromText('POINT(41.2520305 1.0896014)'), 4326)),
(95, ST_SRID(ST_GeomFromText('POINT(41.1970367 1.1107223)'), 4326)),
(96, ST_SRID(ST_GeomFromText('POINT(41.1905227 1.2560126)'), 4326)),
(97, ST_SRID(ST_GeomFromText('POINT(41.1849096 1.2099939)'), 4326)),
(98, ST_SRID(ST_GeomFromText('POINT(41.2099722 1.2053221)'), 4326)),
(99, ST_SRID(ST_GeomFromText('POINT(41.182896 1.3740556)'), 4326)),
(100, ST_SRID(ST_GeomFromText('POINT(41.1667116 1.3607894)'), 4326)),
(101, ST_SRID(ST_GeomFromText('POINT(41.1759037 1.3270397)'), 4326)),
(102, ST_SRID(ST_GeomFromText('POINT(41.2037974 1.2811647)'), 4326)),
(103, ST_SRID(ST_GeomFromText('POINT(41.225402 1.3110783)'), 4326)),
(104, ST_SRID(ST_GeomFromText('POINT(41.8937008 2.831922)'), 4326)),
(105, ST_SRID(ST_GeomFromText('POINT(41.9213427 2.8591701)'), 4326)),
(106, ST_SRID(ST_GeomFromText('POINT(41.8734128 2.8250035)'), 4326)),
(107, ST_SRID(ST_GeomFromText('POINT(41.76527249999999 2.653018)'), 4326)),
(108, ST_SRID(ST_GeomFromText('POINT(41.79101370000001 2.5857557)'), 4326)),
(109, ST_SRID(ST_GeomFromText('POINT(41.9376629 2.7620863)'), 4326)),
(110, ST_SRID(ST_GeomFromText('POINT(42.0363141 2.6471572)'), 4326)),
(111, ST_SRID(ST_GeomFromText('POINT(41.90452250000001 2.6841937)'), 4326)),
(112, ST_SRID(ST_GeomFromText('POINT(41.9455163 2.5566339)'), 4326)),
(113, ST_SRID(ST_GeomFromText('POINT(42.0405288 2.5052892)'), 4326)),
(114, ST_SRID(ST_GeomFromText('POINT(42.1251497 2.6875517)'), 4326)),
(115, ST_SRID(ST_GeomFromText('POINT(42.1240901 2.6399215)'), 4326)),
(116, ST_SRID(ST_GeomFromText('POINT(42.089198 2.590869)'), 4326)),
(117, ST_SRID(ST_GeomFromText('POINT(42.0327715 2.7374949)'), 4326)),
(118, ST_SRID(ST_GeomFromText('POINT(42.094148 2.7670699)'), 4326)),
(119, ST_SRID(ST_GeomFromText('POINT(41.9887928 3.1098827)'), 4326)),
(120, ST_SRID(ST_GeomFromText('POINT(41.9521626 3.1697432)'), 4326)),
(121, ST_SRID(ST_GeomFromText('POINT(41.8820134 3.1328011)'), 4326)),
(122, ST_SRID(ST_GeomFromText('POINT(41.9570559 2.9922348)'), 4326)),
(123, ST_SRID(ST_GeomFromText('POINT(41.9476764 3.0876783)'), 4326)),
(124, ST_SRID(ST_GeomFromText('POINT(42.0207324 3.0400945)'), 4326)),
(125, ST_SRID(ST_GeomFromText('POINT(42.0196728 2.9741186)'), 4326)),
(126, ST_SRID(ST_GeomFromText('POINT(42.0140341 3.0125674)'), 4326)),
(127, ST_SRID(ST_GeomFromText('POINT(42.017653 2.9079214)'), 4326)),
(128, ST_SRID(ST_GeomFromText('POINT(41.9900627 2.9572535)'), 4326)),
(129, ST_SRID(ST_GeomFromText('POINT(42.0201769 2.9307448)'), 4326)),
(130, ST_SRID(ST_GeomFromText('POINT(41.9872589 3.0144382)'), 4326)),
(131, ST_SRID(ST_GeomFromText('POINT(42.0399835 2.9975238)'), 4326)),
(132, ST_SRID(ST_GeomFromText('POINT(42.0113688 3.1127413)'), 4326)),
(133, ST_SRID(ST_GeomFromText('POINT(42.0263922 3.1037253)'), 4326)),
(134, ST_SRID(ST_GeomFromText('POINT(42.02760670000001 3.0723337)'), 4326)),
(135, ST_SRID(ST_GeomFromText('POINT(42.0512118 3.1027146)'), 4326)),
(136, ST_SRID(ST_GeomFromText('POINT(42.0863251 2.990057)'), 4326)),
(137, ST_SRID(ST_GeomFromText('POINT(42.102769 3.0225754)'), 4326)),
(138, ST_SRID(ST_GeomFromText('POINT(42.0789179 3.0560877)'), 4326)),
(139, ST_SRID(ST_GeomFromText('POINT(42.1056905 2.9934954)'), 4326)),
(140, ST_SRID(ST_GeomFromText('POINT(42.0667654 2.9094816)'), 4326)),
(141, ST_SRID(ST_GeomFromText('POINT(42.0696837 2.7955351)'), 4326)),
(142, ST_SRID(ST_GeomFromText('POINT(42.148948 3.0269546)'), 4326)),
(143, ST_SRID(ST_GeomFromText('POINT(42.132877 3.0745255)'), 4326)),
(144, ST_SRID(ST_GeomFromText('POINT(42.1048463 3.08392)'), 4326)),
(145, ST_SRID(ST_GeomFromText('POINT(42.0792042 3.0958224)'), 4326)),
(146, ST_SRID(ST_GeomFromText('POINT(42.1758038 2.9906822)'), 4326)),
(147, ST_SRID(ST_GeomFromText('POINT(42.1752713 3.0397249)'), 4326)),
(148, ST_SRID(ST_GeomFromText('POINT(42.1437291 2.9547495)'), 4326)),
(149, ST_SRID(ST_GeomFromText('POINT(42.1950906 3.0544899)'), 4326)),
(150, ST_SRID(ST_GeomFromText('POINT(42.1386367 2.8879555)'), 4326)),
(151, ST_SRID(ST_GeomFromText('POINT(42.2213489 2.7446554)'), 4326)),
(152, ST_SRID(ST_GeomFromText('POINT(42.1977503 2.6687289)'), 4326)),
(153, ST_SRID(ST_GeomFromText('POINT(42.1880382 2.7985236)'), 4326)),
(154, ST_SRID(ST_GeomFromText('POINT(42.1779464 2.7950993)'), 4326)),
(155, ST_SRID(ST_GeomFromText('POINT(42.1422848 2.7901189)'), 4326)),
(156, ST_SRID(ST_GeomFromText('POINT(42.2160996 2.6415719)'), 4326)),
(157, ST_SRID(ST_GeomFromText('POINT(42.1888537 2.4085624)'), 4326)),
(158, ST_SRID(ST_GeomFromText('POINT(42.2119401 2.5941239)'), 4326)),
(159, ST_SRID(ST_GeomFromText('POINT(42.2110492 2.453826)'), 4326)),
(160, ST_SRID(ST_GeomFromText('POINT(42.3047854 2.7204483)'), 4326)),
(161, ST_SRID(ST_GeomFromText('POINT(42.2718071 2.5285315)'), 4326)),
(162, ST_SRID(ST_GeomFromText('POINT(42.2356878 2.6501618)'), 4326)),
(163, ST_SRID(ST_GeomFromText('POINT(42.2338828 2.6319543)'), 4326)),
(164, ST_SRID(ST_GeomFromText('POINT(42.2136719 2.9325785)'), 4326)),
(165, ST_SRID(ST_GeomFromText('POINT(42.2118666 3.0025615)'), 4326)),
(166, ST_SRID(ST_GeomFromText('POINT(42.1927719 2.9544372)'), 4326)),
(167, ST_SRID(ST_GeomFromText('POINT(42.2240903 2.8614511)'), 4326)),
(168, ST_SRID(ST_GeomFromText('POINT(42.25208809999999 2.9956836)'), 4326)),
(169, ST_SRID(ST_GeomFromText('POINT(42.2441155 3.0413461)'), 4326)),
(170, ST_SRID(ST_GeomFromText('POINT(42.2274676 3.0419719)'), 4326)),
(171, ST_SRID(ST_GeomFromText('POINT(42.2335098 2.9519385)'), 4326)),
(172, ST_SRID(ST_GeomFromText('POINT(42.2654013 3.0182054)'), 4326)),
(173, ST_SRID(ST_GeomFromText('POINT(42.306365 2.9675572)'), 4326)),
(174, ST_SRID(ST_GeomFromText('POINT(42.3074478 3.1127413)'), 4326)),
(175, ST_SRID(ST_GeomFromText('POINT(42.3085262 3.0726468)'), 4326)),
(176, ST_SRID(ST_GeomFromText('POINT(42.3241692 3.1870667)'), 4326)),
(177, ST_SRID(ST_GeomFromText('POINT(42.2536062 2.9126022)'), 4326)),
(178, ST_SRID(ST_GeomFromText('POINT(42.2303509 2.8200093)'), 4326)),
(179, ST_SRID(ST_GeomFromText('POINT(42.2459247 2.8184321)'), 4326)),
(180, ST_SRID(ST_GeomFromText('POINT(42.2543606 2.8826534)'), 4326)),
(181, ST_SRID(ST_GeomFromText('POINT(42.33044230000001 2.8565087)'), 4326)),
(182, ST_SRID(ST_GeomFromText('POINT(42.29019690000001 2.8277963)'), 4326)),
(183, ST_SRID(ST_GeomFromText('POINT(42.3225318 2.7885626)'), 4326)),
(184, ST_SRID(ST_GeomFromText('POINT(42.3099409 2.8380772)'), 4326)),
(185, ST_SRID(ST_GeomFromText('POINT(42.3508095 2.9728687)'), 4326)),
(186, ST_SRID(ST_GeomFromText('POINT(42.3599287 3.000373)'), 4326)),
(187, ST_SRID(ST_GeomFromText('POINT(42.3733794 2.9194681)'), 4326)),
(188, ST_SRID(ST_GeomFromText('POINT(42.3143921 2.9303932)'), 4326)),
(189, ST_SRID(ST_GeomFromText('POINT(42.3909458 3.0006856)'), 4326)),
(190, ST_SRID(ST_GeomFromText('POINT(42.4026078 3.0476046)'), 4326)),
(191, ST_SRID(ST_GeomFromText('POINT(42.3753663 3.0673242)'), 4326)),
(192, ST_SRID(ST_GeomFromText('POINT(42.40368340000001 2.8000802)'), 4326)),
(193, ST_SRID(ST_GeomFromText('POINT(42.4221088 2.9254799)'), 4326)),
(194, ST_SRID(ST_GeomFromText('POINT(42.2186353 2.9069853)'), 4326)),
(195, ST_SRID(ST_GeomFromText('POINT(42.1774294 2.969588)'), 4326)),
(196, ST_SRID(ST_GeomFromText('POINT(42.1896492 2.9076094)'), 4326)),
(197, ST_SRID(ST_GeomFromText('POINT(42.2528434 2.9425698)'), 4326)),
(198, ST_SRID(ST_GeomFromText('POINT(42.2225052 2.9725563)'), 4326)),
(199, ST_SRID(ST_GeomFromText('POINT(42.3380313 2.8954417)'), 4326)),
(200, ST_SRID(ST_GeomFromText('POINT(42.237315 2.7095744)'), 4326)),
(201, ST_SRID(ST_GeomFromText('POINT(42.0728133 3.0106912)'), 4326)),
(202, ST_SRID(ST_GeomFromText('POINT(41.9514115 3.1328011)'), 4326)),
(203, ST_SRID(ST_GeomFromText('POINT(42.037577 3.0344627)'), 4326)),
(204, ST_SRID(ST_GeomFromText('POINT(42.0008093 3.0682635)'), 4326)),
(205, ST_SRID(ST_GeomFromText('POINT(42.0461613 2.9419453)'), 4326)),
(206, ST_SRID(ST_GeomFromText('POINT(42.0955967 2.9297688)'), 4326)),
(207, ST_SRID(ST_GeomFromText('POINT(41.7273226 2.6786163)'), 4326)),
(208, ST_SRID(ST_GeomFromText('POINT(41.640497 1.7903143)'), 4326)),
(209, ST_SRID(ST_GeomFromText('POINT(41.4500186 1.8995445)'), 4326)),
(210, ST_SRID(ST_GeomFromText('POINT(41.56444949999999 1.8147696)'), 4326)),
(211, ST_SRID(ST_GeomFromText('POINT(41.6304028 1.9035146)'), 4326)),
(212, ST_SRID(ST_GeomFromText('POINT(41.5265024 1.959412)'), 4326)),
(213, ST_SRID(ST_GeomFromText('POINT(41.5556586 2.3547718)'), 4326)),
(214, ST_SRID(ST_GeomFromText('POINT(41.5189241 2.2547313)'), 4326)),
(215, ST_SRID(ST_GeomFromText('POINT(41.6477384 2.5102008)'), 4326)),
(216, ST_SRID(ST_GeomFromText('POINT(41.6520479 2.4400208)'), 4326)),
(217, ST_SRID(ST_GeomFromText('POINT(41.7250133 2.4639623)'), 4326)),
(218, ST_SRID(ST_GeomFromText('POINT(41.6939748 2.3532739)'), 4326)),
(219, ST_SRID(ST_GeomFromText('POINT(41.7274934 2.4428424)'), 4326)),
(220, ST_SRID(ST_GeomFromText('POINT(41.7318992 2.5022418)'), 4326)),
(221, ST_SRID(ST_GeomFromText('POINT(41.6831865 2.3928002)'), 4326)),
(222, ST_SRID(ST_GeomFromText('POINT(41.6658732 1.6842693)'), 4326)),
(223, ST_SRID(ST_GeomFromText('POINT(41.6747239 1.8435319)'), 4326)),
(224, ST_SRID(ST_GeomFromText('POINT(41.6998359 1.9768377)'), 4326)),
(225, ST_SRID(ST_GeomFromText('POINT(41.7368442 1.977755)'), 4326)),
(226, ST_SRID(ST_GeomFromText('POINT(41.6787633 2.0583576)'), 4326)),
(227, ST_SRID(ST_GeomFromText('POINT(41.6939066 2.1151912)'), 4326)),
(228, ST_SRID(ST_GeomFromText('POINT(41.7391536 2.2665964)'), 4326)),
(229, ST_SRID(ST_GeomFromText('POINT(41.7208204 2.2736559)'), 4326)),
(230, ST_SRID(ST_GeomFromText('POINT(41.7587683 2.3955568)'), 4326)),
(231, ST_SRID(ST_GeomFromText('POINT(41.7062899 2.4319794)'), 4326)),
(232, ST_SRID(ST_GeomFromText('POINT(41.739757 1.6293497)'), 4326)),
(233, ST_SRID(ST_GeomFromText('POINT(41.7616585 1.6669595)'), 4326)),
(234, ST_SRID(ST_GeomFromText('POINT(41.7284297 1.7061442)'), 4326)),
(235, ST_SRID(ST_GeomFromText('POINT(41.8343436 1.8367862)'), 4326)),
(236, ST_SRID(ST_GeomFromText('POINT(41.7967153 1.7327407)'), 4326)),
(237, ST_SRID(ST_GeomFromText('POINT(41.8107412 2.0888093)'), 4326)),
(238, ST_SRID(ST_GeomFromText('POINT(41.810067 2.0893778)'), 4326)),
(239, ST_SRID(ST_GeomFromText('POINT(41.7306106 2.1477179)'), 4326)),
(240, ST_SRID(ST_GeomFromText('POINT(41.8105808 2.0897397)'), 4326)),
(241, ST_SRID(ST_GeomFromText('POINT(41.7703577 2.1548473)'), 4326)),
(242, ST_SRID(ST_GeomFromText('POINT(41.8144031 2.1034543)'), 4326)),
(243, ST_SRID(ST_GeomFromText('POINT(41.8689747 2.1115818)'), 4326)),
(244, ST_SRID(ST_GeomFromText('POINT(41.9444493 2.0207462)'), 4326)),
(245, ST_SRID(ST_GeomFromText('POINT(41.9551382 1.8025852)'), 4326)),
(246, ST_SRID(ST_GeomFromText('POINT(42.0321658 1.9392435)'), 4326)),
(247, ST_SRID(ST_GeomFromText('POINT(42.0038371 1.9766848)'), 4326)),
(248, ST_SRID(ST_GeomFromText('POINT(42.0070702 2.0309926)'), 4326)),
(249, ST_SRID(ST_GeomFromText('POINT(41.9325408 2.060086)'), 4326)),
(250, ST_SRID(ST_GeomFromText('POINT(42.0284418 2.0731076)'), 4326)),
(251, ST_SRID(ST_GeomFromText('POINT(42.03570970000001 2.1654733)'), 4326)),
(252, ST_SRID(ST_GeomFromText('POINT(42.056617 1.9054599)'), 4326)),
(253, ST_SRID(ST_GeomFromText('POINT(42.050443 2.0360443)'), 4326)),
(254, ST_SRID(ST_GeomFromText('POINT(42.0427828 2.109435)'), 4326)),
(255, ST_SRID(ST_GeomFromText('POINT(42.0042187 2.0271807)'), 4326)),
(256, ST_SRID(ST_GeomFromText('POINT(41.896406 2.2438101)'), 4326)),
(257, ST_SRID(ST_GeomFromText('POINT(41.8782719 2.1809983)'), 4326)),
(258, ST_SRID(ST_GeomFromText('POINT(41.940098 2.3162571)'), 4326)),
(259, ST_SRID(ST_GeomFromText('POINT(41.9013387 2.2821595)'), 4326)),
(260, ST_SRID(ST_GeomFromText('POINT(41.910644 2.1886294)'), 4326)),
(261, ST_SRID(ST_GeomFromText('POINT(41.9467382 2.384139)'), 4326)),
(262, ST_SRID(ST_GeomFromText('POINT(41.7600578 2.2482737)'), 4326)),
(263, ST_SRID(ST_GeomFromText('POINT(41.9458819 2.2393486)'), 4326)),
(264, ST_SRID(ST_GeomFromText('POINT(41.9858803 2.3112054)'), 4326)),
(265, ST_SRID(ST_GeomFromText('POINT(41.9936567 2.2217015)'), 4326)),
(266, ST_SRID(ST_GeomFromText('POINT(41.99526669999999 2.4177834)'), 4326)),
(267, ST_SRID(ST_GeomFromText('POINT(42.0245042 2.4655228)'), 4326)),
(268, ST_SRID(ST_GeomFromText('POINT(41.9689099 2.1548473)'), 4326)),
(269, ST_SRID(ST_GeomFromText('POINT(42.0172312 2.244446)'), 4326)),
(270, ST_SRID(ST_GeomFromText('POINT(42.06679339999999 2.2138289)'), 4326)),
(271, ST_SRID(ST_GeomFromText('POINT(42.058719 2.1505496)'), 4326)),
(272, ST_SRID(ST_GeomFromText('POINT(42.1274019 2.2584235)'), 4326)),
(273, ST_SRID(ST_GeomFromText('POINT(42.0638003 2.2722722)'), 4326)),
(274, ST_SRID(ST_GeomFromText('POINT(42.1119857 2.1606806)'), 4326)),
(275, ST_SRID(ST_GeomFromText('POINT(42.1239055 2.3101467)'), 4326)),
(276, ST_SRID(ST_GeomFromText('POINT(42.1095379 2.2082961)'), 4326)),
(277, ST_SRID(ST_GeomFromText('POINT(42.0855753 2.1273796)'), 4326)),
(278, ST_SRID(ST_GeomFromText('POINT(41.952892 2.3255518)'), 4326)),
(279, ST_SRID(ST_GeomFromText('POINT(41.9010892 2.3812078)'), 4326)),
(280, ST_SRID(ST_GeomFromText('POINT(41.8697876 2.4174746)'), 4326)),
(281, ST_SRID(ST_GeomFromText('POINT(41.8168113 2.3054067)'), 4326)),
(282, ST_SRID(ST_GeomFromText('POINT(42.05356829999999 1.7712445)'), 4326)),
(283, ST_SRID(ST_GeomFromText('POINT(42.0181068 1.7649874)'), 4326)),
(284, ST_SRID(ST_GeomFromText('POINT(42.0831454 1.7548008)'), 4326)),
(285, ST_SRID(ST_GeomFromText('POINT(42.1206982 1.7626291)'), 4326)),
(286, ST_SRID(ST_GeomFromText('POINT(42.1808103 1.8366338)'), 4326)),
(287, ST_SRID(ST_GeomFromText('POINT(42.1909605 1.900155)'), 4326)),
(288, ST_SRID(ST_GeomFromText('POINT(42.0807981 1.9616369)'), 4326)),
(289, ST_SRID(ST_GeomFromText('POINT(42.1367098 1.9337446)'), 4326)),
(290, ST_SRID(ST_GeomFromText('POINT(42.1504834 2.1158758)'), 4326)),
(291, ST_SRID(ST_GeomFromText('POINT(42.1971711 2.3050257)'), 4326)),
(292, ST_SRID(ST_GeomFromText('POINT(42.1347563 1.9939643)'), 4326)),
(293, ST_SRID(ST_GeomFromText('POINT(42.1730883 1.9452014)'), 4326)),
(294, ST_SRID(ST_GeomFromText('POINT(42.1871657 2.023848)'), 4326)),
(295, ST_SRID(ST_GeomFromText('POINT(42.2035507 1.8180608)'), 4326)),
(296, ST_SRID(ST_GeomFromText('POINT(42.22347 1.8919141)'), 4326)),
(297, ST_SRID(ST_GeomFromText('POINT(42.2717296 1.7830973)'), 4326)),
(298, ST_SRID(ST_GeomFromText('POINT(42.2290105 1.735936)'), 4326)),
(299, ST_SRID(ST_GeomFromText('POINT(42.237224 1.6596733)'), 4326)),
(300, ST_SRID(ST_GeomFromText('POINT(42.2829512 2.0172181)'), 4326)),
(301, ST_SRID(ST_GeomFromText('POINT(42.2948623 2.1416484)'), 4326)),
(302, ST_SRID(ST_GeomFromText('POINT(42.2477628 2.0907311)'), 4326)),
(303, ST_SRID(ST_GeomFromText('POINT(42.316176 2.103915)'), 4326)),
(304, ST_SRID(ST_GeomFromText('POINT(42.3215986 2.0158409)'), 4326)),
(305, ST_SRID(ST_GeomFromText('POINT(42.37510229999999 2.3018277)'), 4326)),
(306, ST_SRID(ST_GeomFromText('POINT(42.3205278 2.3439807)'), 4326)),
(307, ST_SRID(ST_GeomFromText('POINT(42.3467302 2.4049853)'), 4326)),
(308, ST_SRID(ST_GeomFromText('POINT(42.2659846 2.2777977)'), 4326)),
(309, ST_SRID(ST_GeomFromText('POINT(42.3309462 2.311995)'), 4326)),
(310, ST_SRID(ST_GeomFromText('POINT(42.3125691 2.2141363)'), 4326)),
(311, ST_SRID(ST_GeomFromText('POINT(42.3495303 2.1628299)'), 4326)),
(312, ST_SRID(ST_GeomFromText('POINT(41.3873974 2.168568)'), 4326)), -- Barcelona
(313, ST_SRID(ST_GeomFromText('POINT(41.9794005 2.8214264)'), 4326)), -- Girona
(314, ST_SRID(ST_GeomFromText('POINT(41.1188827 1.2444909)'), 4326)); -- Tarragona