-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.yml
237 lines (220 loc) · 5.19 KB
/
project.yml
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
bounds: &world
- -180
- -85.05112877980659
- 180
- 85.05112877980659
center:
- 3.4018
- 47.8511
- 18
format: png8
interactivity: false
minzoom: 6
maxzoom: 20
scale: 1
metatile: 8
name: bdtopo-cartocss
description: ''
attribution: 'Data IGN/BDTopo 2022-01 (Lic. Ouverte)'
# Various parts to be included later on
_parts:
extents: &extents
extent: *world
srs-name: "3857"
srs: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over"
extents84: &extents84
extent: *world
srs-name: "WGS84"
srs: "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
db: &db
type: "postgis"
dbname: "osm"
host: "localhost"
user: "bdtopo"
password: m4d31nfr4nc3
geometry_field: geometrie
extent: "-20037508,-20037508,20037508,20037508"
srid: 3857
asynchronous_request: true
max_async_connection: 4
max_size: 200
Stylesheet:
- style.mss
- transport.mss
- services_et_activites.mss
- bati.mss
Layer:
# Surfacique
- id: zone_d_activite_ou_d_interet
<<: *extents84
Datasource:
<<: *db
table: >-
(
SELECT
geometrie,
categorie,
nature,
nature_detaillee,
toponyme
FROM
bdtopo_zone_d_activite_ou_d_interet
WHERE
etat_de_l_objet = 'En service'
ORDER BY importance, ST_Area(geometrie) DESC
) as zone_d_activite_ou_d_interet
- id: cimetiere
<<: *extents84
Datasource:
<<: *db
table: >-
(
SELECT
geometrie,
nature
FROM
bdtopo_cimetiere
WHERE
etat_de_l_objet = 'En service'
) as cimetiere
# Linéaire
- id: troncon_de_voie_ferree
<<: *extents84
Datasource:
<<: *db
table: >-
(
SELECT
geometrie,
cpx_toponyme,
nombre_de_voies,
electrifie
FROM
bdtopo_troncon_de_voie_ferree
WHERE
etat_de_l_objet = 'En service'
) as troncon_de_voie_ferree
- id: troncon_de_route
<<: *extents84
Datasource:
<<: *db
table: >-
(
SELECT
r.geometrie,
r.nature,
r.prive,
r.nom_1_gauche as nom,
r.cpx_numero,
7-r.importance::int as width,
r.importance,
r.sens_de_circulation,
r.fictif::text,
min(r2.importance) as max
FROM
bdtopo_troncon_de_route r
LEFT JOIN
bdtopo_troncon_de_route r2
ON (ST_dwithin(r.geometrie, r2.geometrie, 0.001) and r.nom_1_gauche=r2.nom_1_gauche and r.importance > r2.importance)
WHERE
r.etat_de_l_objet = 'En service'
GROUP BY 1,2,3,4,5,6,7,8,9
) as troncon_de_route
- id: voie_nommee
<<: *extents84
Datasource:
<<: *db
table: >-
(
SELECT
r.geometrie,
regexp_replace(regexp_replace(regexp_replace(initcap(nom_minuscule),E' L(e |a |es |\x27)',' l\1','g'),E' D(e |u |es |\x27)',' d\1','g'),' A(|u|ux) ',' a\1 ','g') as nom,
r.qualite_passage_maj_min as qualite,
r.id_pseudo_fpb
FROM
bdtopo_voie_nommee r
WHERE
r.validite
) as troncon_de_route
# Ponctuel
- id: toponymie_transport
status: off
<<: *extents84
Datasource:
<<: *db
table: >-
(
SELECT
geometrie,
graphie
FROM
bdtopo_toponymie_transport
ORDER BY importance
) as toponymie_transport
- id: point_du_reseau
<<: *extents84
Datasource:
<<: *db
table: >-
(
SELECT
geometrie,
nature
FROM
bdtopo_point_du_reseau
WHERE
etat_de_l_objet = 'En service'
) as point_du_reseau
- id: point_de_repere
<<: *extents84
Datasource:
<<: *db
table: >-
(
SELECT
geometrie,
route,
numero
FROM
bdtopo_point_de_repere
) as point_de_repere
- id: non_communication
status: off
<<: *extents84
Datasource:
<<: *db
table: >-
(
SELECT
geometrie
FROM
bdtopo_non_communication
) as non_communication
- id: toponymie_services_et_activites
<<: *extents84
Datasource:
<<: *db
table: >-
(
SELECT
geometrie,
nature_de_l_objet,
graphie_du_toponyme
FROM
bdtopo_toponymie_services_et_activites
) as toponymie_services_et_activites
- id: construction_ponctuelle
<<: *extents84
Datasource:
<<: *db
table: >-
(
SELECT
geometrie,
coalesce(nature_detaillee, nature) as nature,
toponyme
FROM
bdtopo_construction_ponctuelle
WHERE
etat_de_l_objet = 'En service'
) as construction_ponctuelle