-
Notifications
You must be signed in to change notification settings - Fork 3
/
module_seeds.rb
237 lines (225 loc) · 24.7 KB
/
module_seeds.rb
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
# frozen_string_literal: true
require "decidim/homepage_interactive_map/coordinates_swapper"
puts "Homepage interactive map module setup"
puts "-- Adding Geojson to Scopes"
last_scope = Decidim::Scope.first
first_scope = Decidim::Scope.last
# rubocop:disable Metrics/LineLength
# rubocop:disable Style/NumericLiterals
last_scope_geojson = {
color: Faker::Color.hex_color,
geometry: {
"type": "Feature",
"properties": {
"infobulle": "1.1\nCapitole / Arnaud Bernard / Carmes\nSecteur Toulouse Centre\nMaire de quartier : Julie Escudier",
"quartier": "1.1",
"nom_quartier": "Capitole / Arnaud Bernard / Carmes",
"maire_de_quartier": "Julie Escudier",
"secteur": 1,
"nom_secteur": "Toulouse Centre",
"libelle_maire": "Maire de quartier : Julie Escudier",
"oid": 141
},
"formattedProperties": {
"infobulle": "1.1<br/>Capitole / Arnaud Bernard / Carmes<br/>Secteur Toulouse Centre<br/>Maire de quartier : Julie Escudier",
"quartier": "1.1",
"nom_quartier": "Capitole / Arnaud Bernard / Carmes",
"maire_de_quartier": "Julie Escudier",
"secteur": "1",
"nom_secteur": "Toulouse Centre",
"libelle_maire": "Maire de quartier : Julie Escudier",
"oid": "141"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [[[[1573602.4566999997, 2268250.6752999895], [1573624.2126999998, 2268305.2724999874], [1573631.6999, 2268349.5726999887], [1573623.7275999999, 2268406.499499987], [1573652.765, 2268780.269399989], [1573663.5813999998, 2268943.4267999902], [1573657.9015999998, 2268984.1492999885], [1573747.4259999997, 2269021.093199987], [1573824.6926999998, 2269049.7217999888], [1573877.5041999999, 2269069.2881999873], [1573956.1827999998, 2269103.791899989], [1573968.9290999998, 2269093.7083999906], [1573994.7877999998, 2269107.594999989], [1574084.8778, 2269081.256099989], [1574121.6900999998, 2269070.5677999863], [1574145.0784999998, 2269063.765899987], [1574223.4056999998, 2269038.7786999876], [1574295.4223999998, 2269013.209099987], [1574348.2206, 2268989.994299988], [1574404.0770999999, 2268940.582699989], [1574431.2643999998, 2268908.3140999894], [1574573.6241, 2268707.6121999864], [1574578.5051999998, 2268699.9009999903], [1574616.1686999998, 2268649.3679999886], [1574637.0531999997, 2268617.674099989], [1574658.4906999997, 2268589.549499987], [1574671.5939999998, 2268571.1590999886], [1574715.5819999997, 2268509.330199987], [1574753.4344999997, 2268456.062299987], [1574762.6968999999, 2268444.008299989], [1574770.9183999998, 2268433.2240999886], [1574788.8124999998, 2268409.120999989], [1574838.2093999998, 2268339.787399989], [1574863.4870999998, 2268305.3263999894], [1574874.4140999997, 2268290.9476999915], [1574929.3395999998, 2268216.1057999893], [1574931.8357999998, 2268212.722699987], [1574967.0191999997, 2268167.7798999865], [1574992.9499999997, 2268122.4870999856], [1575011.4999999998, 2268074.20319999], [1575015.3037999999, 2267994.6033999897], [1575018.3711999997, 2267942.2335999873], [1575020.1478, 2267899.754799989], [1575022.7090999999, 2267850.0162999863], [1575005.5100999998, 2267855.089199987], [1575003.2245999998, 2267844.910499989], [1575002.5749999997, 2267815.063199989], [1575007.7458999997, 2267708.019199987], [1575017.5612999997, 2267576.2378999856], [1575028.1760999998, 2267438.8796999883], [1574986.9762, 2267425.7413999867], [1574955.3095999998, 2267394.660699989], [1574942.5954999998, 2267354.1852999874], [1574948.5657999997, 2267310.307899987], [1574977.0509, 2267269.095399988], [1574786.1090999998, 2267179.2181999874], [1574725.1236999999, 2267149.2035999885], [1574671.1375999998, 2267127.1241999874], [1574558.1505999998, 2267073.4383999887], [1574534.7306999997, 2267062.265699988], [1574519.7821999998, 2267059.3319999855], [1574507.8996999997, 2267058.687299988], [1574480.6920999999, 2267047.123999989], [1574408.8601999998, 2267014.4598999885], [1574390.8212, 2267005.978699988], [1574322.6803999997, 2266974.862999989], [1574255.5909999998, 2266943.844599988], [1574239.7765999998, 2266937.553699987], [1574217.7972999997, 2266936.1459999885], [1574185.3690999998, 2266942.9114999888], [1574154.0832999998, 2266947.776499989], [1574106.1073999999, 2266955.608099989], [1574063.7861, 2266960.662799989], [1574033.8575999998, 2266964.360899988], [1573999.5204999999, 2266968.933999987], [1573777.4832999997, 2266998.802299989], [1573777.4377999997, 2266998.8085999875], [1573846.3149999997, 2267098.5571999885], [1573921.1078999997, 2267229.583899989], [1573960.5675999997, 2267344.799699987], [1573980.5897, 2267447.445599988], [1573984.7014999997, 2267572.497799986], [1573975.9248999998, 2267675.365599991], [1573954.0225999998, 2267752.581199988], [1573916.1434999998, 2267829.814299988], [1573868.4174999997, 2267897.662499989], [1573801.5366999998, 2267962.3998999894], [1573699.3646999998, 2268030.5609999886], [1573626.6304999997, 2268058.4482999872], [1573694.7391, 2268181.3283999893], [1573649.9166999997, 2268216.6748999883], [1573625.1408999998, 2268234.4191999915], [1573602.4566999997, 2268250.6752999895]]]],
"crs": "EPSG:3943"
},
"centroid": {
"type": "Point",
"coordinates": [1574370.3795918042, 2268012.582199989],
"crs": "EPSG:3943"
},
"id": "141",
"crs": {
"type": "name",
"properties": {
"name": "EPSG:3943" }
},
"bbox": [1573602.4566999997, 2266936.1459999885, 1575028.1760999998, 2269107.594999989]
},
parsed_geometry: {
"type": "Feature",
"properties": {
"infobulle": "1.1\nCapitole / Arnaud Bernard / Carmes\nSecteur Toulouse Centre\nMaire de quartier : Julie Escudier",
"quartier": "1.1",
"nom_quartier": "Capitole / Arnaud Bernard / Carmes",
"maire_de_quartier": "Julie Escudier",
"secteur": 1,
"nom_secteur": "Toulouse Centre",
"libelle_maire": "Maire de quartier : Julie Escudier",
"oid": 141
},
"formattedProperties": {
"infobulle": "1.1<br/>Capitole / Arnaud Bernard / Carmes<br/>Secteur Toulouse Centre<br/>Maire de quartier : Julie Escudier",
"quartier": "1.1",
"nom_quartier": "Capitole / Arnaud Bernard / Carmes",
"maire_de_quartier": "Julie Escudier",
"secteur": "1",
"nom_secteur": "Toulouse Centre",
"libelle_maire": "Maire de quartier : Julie Escudier",
"oid": "141"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [[[[1573602.4566999997, 2268250.6752999895], [1573624.2126999998, 2268305.2724999874], [1573631.6999, 2268349.5726999887], [1573623.7275999999, 2268406.499499987], [1573652.765, 2268780.269399989], [1573663.5813999998, 2268943.4267999902], [1573657.9015999998, 2268984.1492999885], [1573747.4259999997, 2269021.093199987], [1573824.6926999998, 2269049.7217999888], [1573877.5041999999, 2269069.2881999873], [1573956.1827999998, 2269103.791899989], [1573968.9290999998, 2269093.7083999906], [1573994.7877999998, 2269107.594999989], [1574084.8778, 2269081.256099989], [1574121.6900999998, 2269070.5677999863], [1574145.0784999998, 2269063.765899987], [1574223.4056999998, 2269038.7786999876], [1574295.4223999998, 2269013.209099987], [1574348.2206, 2268989.994299988], [1574404.0770999999, 2268940.582699989], [1574431.2643999998, 2268908.3140999894], [1574573.6241, 2268707.6121999864], [1574578.5051999998, 2268699.9009999903], [1574616.1686999998, 2268649.3679999886], [1574637.0531999997, 2268617.674099989], [1574658.4906999997, 2268589.549499987], [1574671.5939999998, 2268571.1590999886], [1574715.5819999997, 2268509.330199987], [1574753.4344999997, 2268456.062299987], [1574762.6968999999, 2268444.008299989], [1574770.9183999998, 2268433.2240999886], [1574788.8124999998, 2268409.120999989], [1574838.2093999998, 2268339.787399989], [1574863.4870999998, 2268305.3263999894], [1574874.4140999997, 2268290.9476999915], [1574929.3395999998, 2268216.1057999893], [1574931.8357999998, 2268212.722699987], [1574967.0191999997, 2268167.7798999865], [1574992.9499999997, 2268122.4870999856], [1575011.4999999998, 2268074.20319999], [1575015.3037999999, 2267994.6033999897], [1575018.3711999997, 2267942.2335999873], [1575020.1478, 2267899.754799989], [1575022.7090999999, 2267850.0162999863], [1575005.5100999998, 2267855.089199987], [1575003.2245999998, 2267844.910499989], [1575002.5749999997, 2267815.063199989], [1575007.7458999997, 2267708.019199987], [1575017.5612999997, 2267576.2378999856], [1575028.1760999998, 2267438.8796999883], [1574986.9762, 2267425.7413999867], [1574955.3095999998, 2267394.660699989], [1574942.5954999998, 2267354.1852999874], [1574948.5657999997, 2267310.307899987], [1574977.0509, 2267269.095399988], [1574786.1090999998, 2267179.2181999874], [1574725.1236999999, 2267149.2035999885], [1574671.1375999998, 2267127.1241999874], [1574558.1505999998, 2267073.4383999887], [1574534.7306999997, 2267062.265699988], [1574519.7821999998, 2267059.3319999855], [1574507.8996999997, 2267058.687299988], [1574480.6920999999, 2267047.123999989], [1574408.8601999998, 2267014.4598999885], [1574390.8212, 2267005.978699988], [1574322.6803999997, 2266974.862999989], [1574255.5909999998, 2266943.844599988], [1574239.7765999998, 2266937.553699987], [1574217.7972999997, 2266936.1459999885], [1574185.3690999998, 2266942.9114999888], [1574154.0832999998, 2266947.776499989], [1574106.1073999999, 2266955.608099989], [1574063.7861, 2266960.662799989], [1574033.8575999998, 2266964.360899988], [1573999.5204999999, 2266968.933999987], [1573777.4832999997, 2266998.802299989], [1573777.4377999997, 2266998.8085999875], [1573846.3149999997, 2267098.5571999885], [1573921.1078999997, 2267229.583899989], [1573960.5675999997, 2267344.799699987], [1573980.5897, 2267447.445599988], [1573984.7014999997, 2267572.497799986], [1573975.9248999998, 2267675.365599991], [1573954.0225999998, 2267752.581199988], [1573916.1434999998, 2267829.814299988], [1573868.4174999997, 2267897.662499989], [1573801.5366999998, 2267962.3998999894], [1573699.3646999998, 2268030.5609999886], [1573626.6304999997, 2268058.4482999872], [1573694.7391, 2268181.3283999893], [1573649.9166999997, 2268216.6748999883], [1573625.1408999998, 2268234.4191999915], [1573602.4566999997, 2268250.6752999895]]]],
"crs": "EPSG:3943"
},
"centroid": {
"type": "Point",
"coordinates": [1574370.3795918042, 2268012.582199989],
"crs": "EPSG:3943"
},
"id": "141",
"crs": {
"type": "name",
"properties": {
"name": "EPSG:3943" }
},
"bbox": [1573602.4566999997, 2266936.1459999885, 1575028.1760999998, 2269107.594999989]
}
}
first_scope_geojson = {
color: Faker::Color.hex_color,
geometry: {
"type": "Feature",
"properties": {
"infobulle": "1.3\nLes Chalets / Bayard / Belfort / Saint-Aubin / Dupuy\nSecteur Toulouse Centre\nMaire de quartier : Jacqueline Winnepenninckx-Kieser",
"quartier": "1.3",
"nom_quartier": "Les Chalets / Bayard / Belfort / Saint-Aubin / Dupuy",
"maire_de_quartier": "Jacqueline Winnepenninckx-Kieser",
"secteur": 1,
"nom_secteur": "Toulouse Centre",
"libelle_maire": "Maire de quartier : Jacqueline Winnepenninckx-Kieser",
"oid": 143
},
"formattedProperties": {
"infobulle": "1.3<br/>Les Chalets / Bayard / Belfort / Saint-Aubin / Dupuy<br/>Secteur Toulouse Centre<br/>Maire de quartier : Jacqueline Winnepenninckx-Kieser",
"quartier": "1.3",
"nom_quartier": "Les Chalets / Bayard / Belfort / Saint-Aubin / Dupuy",
"maire_de_quartier": "Jacqueline Winnepenninckx-Kieser",
"secteur": "1",
"nom_secteur": "Toulouse Centre",
"libelle_maire": "Maire de quartier : Jacqueline Winnepenninckx-Kieser",
"oid": "143"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[1573864.4303, 2269611.967399989], [1573866.1109999998, 2269612.390899989], [1573937.0363999999, 2269622.778199987], [1573969.0081999998, 2269625.055299987], [1574010.2829999998, 2269620.5339999893], [1574059.0540999998, 2269606.705499987], [1574094.3523, 2269590.457099987], [1574149.8391999998, 2269561.3356999885], [1574209.4182999998, 2269531.34139999], [1574253.9662999997, 2269515.022299988], [1574289.3092999998, 2269504.660199987], [1574332.2395999997, 2269496.657799987], [1574381.9549999998, 2269496.2762999884], [1574435.9200999998, 2269501.853199987], [1574557.4792999998, 2269521.943199988], [1574594.6338999998, 2269528.3852999886], [1574627.5450999998, 2269529.813999988], [1574660.4366999997, 2269528.720599987], [1574696.6147999999, 2269517.511499987], [1574727.6037999997, 2269501.2959999884], [1574750.8255999999, 2269486.5070999917], [1574774.5702999998, 2269471.3989999876], [1574851.7508999999, 2269420.2471999885], [1574945.6152999997, 2269351.5183999864], [1574979.4511999998, 2269322.7728999886], [1574994.3752, 2269308.7833999903], [1575002.4063, 2269300.627699989], [1575024.0712999997, 2269261.044099987], [1575066.1637, 2269157.604399987], [1575098.0465999998, 2269079.78609999], [1575119.5078999999, 2269013.6101999884], [1575153.4739999997, 2268919.5889999894], [1575168.4049999998, 2268892.880499987], [1575211.1196999997, 2268843.149699988], [1575255.6060999997, 2268791.4077999885], [1575265.8960999998, 2268776.2975999885], [1575273.8739999998, 2268761.2048999886], [1575371.6310999999, 2268514.909899989], [1575386.3682, 2268476.5358999893], [1575418.6108999997, 2268388.6487999875], [1575424.6189999997, 2268372.2708999873], [1575427.2432999997, 2268365.117599988], [1575430.5514999998, 2268344.1742999866], [1575430.1517999999, 2268292.1467999886], [1575425.9902999997, 2268201.78169999], [1575419.1988999997, 2268083.791799989], [1575408.3313999998, 2268023.6456999867], [1575379.8280999998, 2267925.3733999887], [1575372.0930999997, 2267889.905099987], [1575360.3106999998, 2267641.92939999], [1575335.3059999999, 2267657.257999987], [1575337.4207, 2267576.6200999874], [1575340.1198999998, 2267489.9866999867], [1575150.7768999997, 2267403.0410999884], [1575139.1744, 2267397.769399987], [1575166.2181999998, 2267360.5622999887], [1575174.8946999998, 2267340.6290999884], [1575174.5936999999, 2267301.4248999893], [1575170.2824, 2267287.4780999897], [1575151.6315999997, 2267254.0901999893], [1575124.5891999998, 2267236.639199989], [1575091.6142999998, 2267226.9063999886], [1575040.7369, 2267226.4562999886], [1575003.4667999998, 2267245.9778999877], [1574977.0509, 2267269.095399988], [1574948.5657999997, 2267310.307899987], [1574942.5954999998, 2267354.1852999874], [1574955.3095999998, 2267394.660699989], [1574986.9762, 2267425.7413999867], [1575028.1760999998, 2267438.8796999883], [1575017.5612999997, 2267576.2378999856], [1575007.7458999997, 2267708.019199987], [1575002.5749999997, 2267815.063199989], [1575003.2245999998, 2267844.910499989], [1575005.5100999998, 2267855.089199987], [1575022.7090999999, 2267850.0162999863], [1575020.1478, 2267899.754799989], [1575018.3711999997, 2267942.2335999873], [1575015.3037999999, 2267994.6033999897], [1575011.4999999998, 2268074.20319999], [1574992.9499999997, 2268122.4870999856], [1574967.0191999997, 2268167.7798999865], [1574931.8357999998, 2268212.722699987], [1574929.3395999998, 2268216.1057999893], [1574874.4140999997, 2268290.9476999915], [1574863.4870999998, 2268305.3263999894], [1574838.2093999998, 2268339.787399989], [1574788.8124999998, 2268409.120999989], [1574770.9183999998, 2268433.2240999886], [1574762.6968999999, 2268444.008299989], [1574753.4344999997, 2268456.062299987], [1574715.5819999997, 2268509.330199987], [1574671.5939999998, 2268571.1590999886], [1574658.4906999997, 2268589.549499987], [1574637.0531999997, 2268617.674099989], [1574616.1686999998, 2268649.3679999886], [1574578.5051999998, 2268699.9009999903], [1574573.6241, 2268707.6121999864], [1574431.2643999998, 2268908.3140999894], [1574404.0770999999, 2268940.582699989], [1574348.2206, 2268989.994299988], [1574295.4223999998, 2269013.209099987], [1574223.4056999998, 2269038.7786999876], [1574145.0784999998, 2269063.765899987], [1574121.6900999998, 2269070.5677999863], [1574084.8778, 2269081.256099989], [1573994.7877999998, 2269107.594999989], [1573968.9290999998, 2269093.7083999906], [1573956.1827999998, 2269103.791899989], [1573956.5775999997, 2269114.1952999886], [1573967.6557999998, 2269119.5761999865], [1573904.1552999998, 2269419.6360999877], [1573891.6357999998, 2269486.689099989], [1573870.2458999997, 2269589.6541999867], [1573864.4303, 2269611.967399989]
]
]
],
"crs": "EPSG:3943"
},
"centroid": {
"type": "Point",
"coordinates": [1575093.2722624019, 2268421.172549989],
"crs": "EPSG:3943"
},
"id": "143",
"crs": {
"type": "name",
"properties": {
"name": "EPSG:3943" }
},
"bbox": [1573864.4303, 2267226.4562999886, 1575430.5514999998, 2269625.055299987]
},
parsed_geometry: {
"type": "Feature",
"properties": {
"infobulle": "1.3\nLes Chalets / Bayard / Belfort / Saint-Aubin / Dupuy\nSecteur Toulouse Centre\nMaire de quartier : Jacqueline Winnepenninckx-Kieser",
"quartier": "1.3",
"nom_quartier": "Les Chalets / Bayard / Belfort / Saint-Aubin / Dupuy",
"maire_de_quartier": "Jacqueline Winnepenninckx-Kieser",
"secteur": 1,
"nom_secteur": "Toulouse Centre",
"libelle_maire": "Maire de quartier : Jacqueline Winnepenninckx-Kieser",
"oid": 143
},
"formattedProperties": {
"infobulle": "1.3<br/>Les Chalets / Bayard / Belfort / Saint-Aubin / Dupuy<br/>Secteur Toulouse Centre<br/>Maire de quartier : Jacqueline Winnepenninckx-Kieser",
"quartier": "1.3",
"nom_quartier": "Les Chalets / Bayard / Belfort / Saint-Aubin / Dupuy",
"maire_de_quartier": "Jacqueline Winnepenninckx-Kieser",
"secteur": "1",
"nom_secteur": "Toulouse Centre",
"libelle_maire": "Maire de quartier : Jacqueline Winnepenninckx-Kieser",
"oid": "143"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [[[[1573864.4303, 2269611.967399989], [1573866.1109999998, 2269612.390899989], [1573937.0363999999, 2269622.778199987], [1573969.0081999998, 2269625.055299987], [1574010.2829999998, 2269620.5339999893], [1574059.0540999998, 2269606.705499987], [1574094.3523, 2269590.457099987], [1574149.8391999998, 2269561.3356999885], [1574209.4182999998, 2269531.34139999], [1574253.9662999997, 2269515.022299988], [1574289.3092999998, 2269504.660199987], [1574332.2395999997, 2269496.657799987], [1574381.9549999998, 2269496.2762999884], [1574435.9200999998, 2269501.853199987], [1574557.4792999998, 2269521.943199988], [1574594.6338999998, 2269528.3852999886], [1574627.5450999998, 2269529.813999988], [1574660.4366999997, 2269528.720599987], [1574696.6147999999, 2269517.511499987], [1574727.6037999997, 2269501.2959999884], [1574750.8255999999, 2269486.5070999917], [1574774.5702999998, 2269471.3989999876], [1574851.7508999999, 2269420.2471999885], [1574945.6152999997, 2269351.5183999864], [1574979.4511999998, 2269322.7728999886], [1574994.3752, 2269308.7833999903], [1575002.4063, 2269300.627699989], [1575024.0712999997, 2269261.044099987], [1575066.1637, 2269157.604399987], [1575098.0465999998, 2269079.78609999], [1575119.5078999999, 2269013.6101999884], [1575153.4739999997, 2268919.5889999894], [1575168.4049999998, 2268892.880499987], [1575211.1196999997, 2268843.149699988], [1575255.6060999997, 2268791.4077999885], [1575265.8960999998, 2268776.2975999885], [1575273.8739999998, 2268761.2048999886], [1575371.6310999999, 2268514.909899989], [1575386.3682, 2268476.5358999893], [1575418.6108999997, 2268388.6487999875], [1575424.6189999997, 2268372.2708999873], [1575427.2432999997, 2268365.117599988], [1575430.5514999998, 2268344.1742999866], [1575430.1517999999, 2268292.1467999886], [1575425.9902999997, 2268201.78169999], [1575419.1988999997, 2268083.791799989], [1575408.3313999998, 2268023.6456999867], [1575379.8280999998, 2267925.3733999887], [1575372.0930999997, 2267889.905099987], [1575360.3106999998, 2267641.92939999], [1575335.3059999999, 2267657.257999987], [1575337.4207, 2267576.6200999874], [1575340.1198999998, 2267489.9866999867], [1575150.7768999997, 2267403.0410999884], [1575139.1744, 2267397.769399987], [1575166.2181999998, 2267360.5622999887], [1575174.8946999998, 2267340.6290999884], [1575174.5936999999, 2267301.4248999893], [1575170.2824, 2267287.4780999897], [1575151.6315999997, 2267254.0901999893], [1575124.5891999998, 2267236.639199989], [1575091.6142999998, 2267226.9063999886], [1575040.7369, 2267226.4562999886], [1575003.4667999998, 2267245.9778999877], [1574977.0509, 2267269.095399988], [1574948.5657999997, 2267310.307899987], [1574942.5954999998, 2267354.1852999874], [1574955.3095999998, 2267394.660699989], [1574986.9762, 2267425.7413999867], [1575028.1760999998, 2267438.8796999883], [1575017.5612999997, 2267576.2378999856], [1575007.7458999997, 2267708.019199987], [1575002.5749999997, 2267815.063199989], [1575003.2245999998, 2267844.910499989], [1575005.5100999998, 2267855.089199987], [1575022.7090999999, 2267850.0162999863], [1575020.1478, 2267899.754799989], [1575018.3711999997, 2267942.2335999873], [1575015.3037999999, 2267994.6033999897], [1575011.4999999998, 2268074.20319999], [1574992.9499999997, 2268122.4870999856], [1574967.0191999997, 2268167.7798999865], [1574931.8357999998, 2268212.722699987], [1574929.3395999998, 2268216.1057999893], [1574874.4140999997, 2268290.9476999915], [1574863.4870999998, 2268305.3263999894], [1574838.2093999998, 2268339.787399989], [1574788.8124999998, 2268409.120999989], [1574770.9183999998, 2268433.2240999886], [1574762.6968999999, 2268444.008299989], [1574753.4344999997, 2268456.062299987], [1574715.5819999997, 2268509.330199987], [1574671.5939999998, 2268571.1590999886], [1574658.4906999997, 2268589.549499987], [1574637.0531999997, 2268617.674099989], [1574616.1686999998, 2268649.3679999886], [1574578.5051999998, 2268699.9009999903], [1574573.6241, 2268707.6121999864], [1574431.2643999998, 2268908.3140999894], [1574404.0770999999, 2268940.582699989], [1574348.2206, 2268989.994299988], [1574295.4223999998, 2269013.209099987], [1574223.4056999998, 2269038.7786999876], [1574145.0784999998, 2269063.765899987], [1574121.6900999998, 2269070.5677999863], [1574084.8778, 2269081.256099989], [1573994.7877999998, 2269107.594999989], [1573968.9290999998, 2269093.7083999906], [1573956.1827999998, 2269103.791899989], [1573956.5775999997, 2269114.1952999886], [1573967.6557999998, 2269119.5761999865], [1573904.1552999998, 2269419.6360999877], [1573891.6357999998, 2269486.689099989], [1573870.2458999997, 2269589.6541999867], [1573864.4303, 2269611.967399989]]]],
"crs": "EPSG:3943"
},
"centroid": {
"type": "Point",
"coordinates": [1575093.2722624019, 2268421.172549989],
"crs": "EPSG:3943"
},
"id": "143",
"crs": {
"type": "name",
"properties": {
"name": "EPSG:3943" }
},
"bbox": [1573864.4303, 2267226.4562999886, 1575430.5514999998, 2269625.055299987] }
}
# rubocop:enable Metrics/LineLength
# rubocop:enable Style/NumericLiterals
last_scope.update!(geojson: Decidim::HomepageInteractiveMap::CoordinatesSwapper.convert_geojson(last_scope_geojson))
first_scope.update!(geojson: Decidim::HomepageInteractiveMap::CoordinatesSwapper.convert_geojson(first_scope_geojson))
puts "-- Linking Assemblies to Scopes"
last_assembly = Decidim::Assembly.last
first_assembly = Decidim::Assembly.first
last_assembly.update!(scope: last_scope, scopes_enabled: true)
first_assembly.update!(scope: first_scope, scopes_enabled: true)
first_participatory_process = Decidim::ParticipatoryProcess.first
last_participatory_process = Decidim::ParticipatoryProcess.last
first_participatory_process.update!(display_linked_assemblies: true)
last_participatory_process.update!(display_linked_assemblies: true)
last_participatory_process.update!(address: "Rue de la Fayette")
last_participatory_process.update!(latitude: 43.604429)
last_participatory_process.update!(longitude: 1.443812)
puts "-- Linking Participatory processes to Assemblies"
Decidim::ParticipatorySpaceLink.create!(
from_type: first_assembly.class,
from_id: first_assembly.id,
to_type: first_participatory_process.class,
to_id: first_participatory_process.id,
name: "included_participatory_processes"
)
Decidim::ParticipatorySpaceLink.create!(
from_type: last_assembly.class,
from_id: last_assembly.id,
to_type: last_participatory_process.class,
to_id: last_participatory_process.id,
name: "included_participatory_processes"
)
puts "-- Adding ContentBlock to homepage"
Decidim::ContentBlock.where(scope_name: "homepage").each do |content_block|
content_block.update!(weight: content_block.weight + 1)
end
# noinspection RubyScope
Decidim::ContentBlock.create!(
decidim_organization_id: first_scope.organization.id,
weight: 1,
scope_name: "homepage",
manifest_name: :interactive_map,
published_at: Time.current
)
puts "######## Info #########"
puts "[Warning !] Don't forget to uncomment map section at development_app/config/initializers/decidim.rb:38"
puts "#######################"