-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathmap_layers.yml
130 lines (118 loc) · 4.28 KB
/
map_layers.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
layers:
track_sections:
table_name: infra_layer_track_section
id_field: id
views:
geo:
on_field: geographic
data_expr: track_section.data
exclude_fields: [geo]
joins:
- inner join infra_object_track_section track_section on track_section.obj_id = layer.obj_id and track_section.infra_id = layer.infra_id
signals:
table_name: infra_layer_signal
id_field: id
views:
geo:
on_field: geographic
data_expr: signal.data - 'logical_signals' || jsonb_build_object('angle', layer.angle_geo, 'signaling_system', layer.signaling_system, 'sprite', layer.sprite)
joins:
- inner join infra_object_signal signal on signal.obj_id = layer.obj_id and signal.infra_id = layer.infra_id
speed_sections:
table_name: infra_layer_speed_section
id_field: id
views:
geo:
on_field: geographic
data_expr: speed_section.data
joins:
- inner join infra_object_speed_section speed_section on speed_section.obj_id = layer.obj_id and speed_section.infra_id = layer.infra_id
where:
- not (speed_section.data @? '$.extensions.psl_sncf.z')
psl:
table_name: infra_layer_speed_section
id_field: id
views:
geo:
on_field: geographic
data_expr: speed_section.data
joins:
- inner join infra_object_speed_section speed_section on speed_section.obj_id = layer.obj_id and speed_section.infra_id = layer.infra_id
where:
- speed_section.data @? '$.extensions.psl_sncf.z'
switches:
table_name: infra_layer_switch
id_field: id
views:
geo:
on_field: geographic
data_expr: switch.data
joins:
- inner join infra_object_switch switch on switch.obj_id = layer.obj_id and switch.infra_id = layer.infra_id
detectors:
table_name: infra_layer_detector
id_field: id
views:
geo:
on_field: geographic
data_expr: detector.data
joins:
- inner join infra_object_detector detector on detector.obj_id = layer.obj_id and detector.infra_id = layer.infra_id
buffer_stops:
table_name: infra_layer_buffer_stop
id_field: id
views:
geo:
on_field: geographic
data_expr: buffer_stop.data
joins:
- inner join infra_object_buffer_stop buffer_stop on buffer_stop.obj_id = layer.obj_id and buffer_stop.infra_id = layer.infra_id
operational_points:
table_name: infra_layer_operational_point
id_field: id
views:
geo:
on_field: geographic
data_expr: operational_point.data - 'parts' || jsonb_build_object('kp', layer.kp, 'track_id', layer.track_section, 'track_name', track_section.data->'extensions'->'sncf'->'track_name')
joins:
- inner join infra_object_operational_point operational_point on operational_point.obj_id = layer.obj_id and operational_point.infra_id = layer.infra_id
- inner join infra_object_track_section track_section on track_section.obj_id = layer.track_section and track_section.infra_id = layer.infra_id
electrifications:
table_name: infra_layer_electrification
id_field: id
views:
geo:
on_field: geographic
data_expr: electrification.data
joins:
- inner join infra_object_electrification electrification on electrification.obj_id = layer.obj_id and electrification.infra_id = layer.infra_id
psl_signs:
table_name: infra_layer_psl_sign
id_field: id
views:
geo:
on_field: geographic
data_expr: layer.data || jsonb_build_object('angle', layer.angle_geo)
neutral_signs:
table_name: infra_layer_neutral_sign
id_field: id
views:
geo:
on_field: geographic
data_expr: layer.data - 'value' || jsonb_build_object('angle', layer.angle_geo)
neutral_sections:
table_name: infra_layer_neutral_section
id_field: id
views:
geo:
on_field: geographic
data_expr: neutral_section.data
joins:
- inner join infra_object_neutral_section neutral_section on neutral_section.obj_id = layer.obj_id and neutral_section.infra_id = layer.infra_id
errors:
table_name: infra_layer_error
id_field: id
views:
geo:
on_field: geographic
data_expr: layer.information