-
Notifications
You must be signed in to change notification settings - Fork 1
/
output-polish-brokenmpoly.yml
144 lines (109 loc) · 3.24 KB
/
output-polish-brokenmpoly.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
#### MP output templates (for broken multipoligons: noheader)
--- output
---
comment: |
[% FOREACH line IN text.split('\n'); "; "; line | mp_filter; "\n"; END -%]
info: |
[% INCLUDE comment text = text; "\n" -%]
section: |
[% "\n\n"; INCLUDE comment text = text; "\n\n" -%]
header: |
[%- "\n\n" -%]
[% INCLUDE comment
text = "### Broken multipolygons appendix"
%]
footer: |
[%- "\n\n" -%]
[% INCLUDE comment
text = "### That's all, folks! I mean it."
%]
_common_fields: |
[% IF data.level_h && data.level_h > (data.level_l || 0) -%]
EndLevel=[% data.level_h %]
[% END -%]
Type=[% data.type %]
[% label = data.name;
IF data.extra_fields.exists('Label');
label = data.extra_fields.Label;
data.extra_fields.delete('Label');
END;
IF data.refs && data.road_ref;
label = data.road_ref _ data.refs.sort.unique.join('-') _ ( label ? ' ' _ label : '' );
END;
IF label.defined -%]
Label=[% label | mp_filter %]
[% END -%]
[% FOREACH key IN data.extra_fields.keys.sort -%]
[% key %]=[% data.extra_fields.$key | mp_filter %]
[% END -%]
point: |
[% INCLUDE comment text = data.comment IF data.comment -%]
[POI]
Data[% data.level_l || 0 %]=([% data.coords.1 %],[% data.coords.0 %])
[% INCLUDE _common_fields data = data -%]
[END]
[% %]
polygon: |
[% INCLUDE comment text = data.comment IF data.comment -%]
[POLYGON]
[% FOREACH contour IN data.contours;
latlons = [];
FOREACH point IN contour;
latlons.push( point.1 _ ',' _ point.0 );
END -%]
Data[% data.level_l || 0 %]=([% latlons.join('),(') %])
[% END -%]
[% INCLUDE _common_fields data = data -%]
[% # TODO: entrances -%]
[END]
[% %]
polyline: |
[% INCLUDE comment text = data.comment IF data.comment -%]
[POLYLINE]
[% latlons = [];
FOREACH point IN data.chain;
latlons.push( point.1 _ ',' _ point.0 );
END -%]
Data[% data.level_l || 0 %]=([% latlons.join('),(') %])
[% INCLUDE _common_fields data = data -%]
[END]
[% %]
road: |
[% INCLUDE comment text = data.comment IF data.comment -%]
[POLYLINE]
[% latlons = [];
FOREACH point IN data.chain;
latlons.push( point.1 _ ',' _ point.0 );
END -%]
Data0=([% latlons.join('),(') %])
RoadID=[% data.road_id %]
[% IF data.oneway -%]
DirIndicator=1
[% END -%]
RouteParams=[% speed_code(data.speed) %],[% data.road_class %],[% data.oneway || 0 %],[% data.toll || 0 %],[% data.access_flags %]
[% INCLUDE _common_fields data = data -%]
[% nodcount = 0; FOREACH nod IN data.nod -%]
Nod[% nodcount %]=[% nod.0 %],[% nod.1 %],[% nod.2 || 0 %]
[% nodcount = nodcount + 1; END -%]
[END]
[% %]
turn_restriction: |
[% INCLUDE comment text = comment IF comment -%]
[Restrict]
TraffPoints=[% opts.node_from %],[% opts.node_via %],[% opts.node_to %]
TraffRoads=[% opts.road_from %],[% opts.road_to %]
[% IF opts.param -%]
RestrParam=[% opts.param %]
[% END -%]
[END-Restrict]
[% %]
destination_sign: |
[% INCLUDE comment text = comment IF comment -%]
[Sign]
SignPoints=[% opts.node_from %],[% opts.node_via %],[% opts.node_to %]
SignRoads=[% opts.road_from %],[% opts.road_to %]
[% IF opts.param -%]
SignParam=[% opts.param %]
[% END -%]
[END-Sign]
[% %]