source: subversion/applications/rendering/parking/mapnik/parking-inc-src/layer-parking-area.xml.inc @ 28220

Revision 28220, 14.2 KB checked in by kdrangmeister, 2 years ago (diff)

corrected typo

Line 
1<Style name="parking-area">
2
3    <!-- parking area: ticket -->
4    <Rule>
5      <Filter>[cond] = 'ticket'</Filter>
6      &maxscale_zoom10;
7      &minscale_zoom15;
8      <PolygonSymbolizer fill="&pa_fee;" fill-opacity="&pa_fill_opacity;"/>
9      <LineSymbolizer stroke="&pa_fee_stroke;" stroke-width="&pa_stroke_width;" stroke-opacity="&pa_stroke_opacity;"/>
10    </Rule>
11    <Rule>
12      <Filter>[cond] = 'ticket' and [parking] = 'surface'</Filter>
13      &maxscale_zoom16;
14      <PolygonPatternSymbolizer file="&symbols;/parking_area_fee.png"/>
15    </Rule>
16    <Rule>
17      <Filter>[cond] = 'ticket' and [parking] = 'multistorey'</Filter>
18      &maxscale_zoom16;
19      <PolygonPatternSymbolizer file="&symbols;/parking_multistorey_fee.png"/>
20    </Rule>
21    <Rule>
22      <Filter>[cond] = 'ticket' and [parking] = 'underground'</Filter>
23      &maxscale_zoom16;
24      <PolygonPatternSymbolizer file="&symbols;/parking_underground_fee.png"/>
25    </Rule>
26
27    <!-- parking area: disc -->
28    <Rule>
29      <Filter>[cond]='disc'</Filter>
30      &maxscale_zoom10;
31      &minscale_zoom15;
32      <PolygonSymbolizer fill="&pa_disc;" fill-opacity="&pa_fill_opacity;"/>
33      <LineSymbolizer stroke="&pa_disc_stroke;" stroke-width="&pa_stroke_width;" stroke-opacity="&pa_stroke_opacity;"/>
34    </Rule>
35    <Rule>
36      <Filter>[cond]='disc' and [parking] = 'surface'</Filter>
37      &maxscale_zoom16;
38      <PolygonPatternSymbolizer file="&symbols;/parking_area_disc.png"/>
39    </Rule>
40    <Rule>
41      <Filter>[cond] = 'disc' and [parking] = 'multistorey'</Filter>
42      &maxscale_zoom16;
43      <PolygonPatternSymbolizer file="&symbols;/parking_multistorey_disc.png"/>
44    </Rule>
45    <Rule>
46      <Filter>[cond] = 'disc' and [parking] = 'underground'</Filter>
47      &maxscale_zoom16;
48      <PolygonPatternSymbolizer file="&symbols;/parking_underground_disc.png"/>
49    </Rule>
50
51    <!-- parking area: customers -->
52    <Rule>
53      <Filter>[cond]='customers'</Filter>
54      &maxscale_zoom10;
55      &minscale_zoom15;
56      <PolygonSymbolizer fill="&pa_customers;" fill-opacity="&pa_fill_opacity;"/>
57      <LineSymbolizer stroke="&pa_customers_stroke;" stroke-width="&pa_stroke_width;" stroke-opacity="&pa_stroke_opacity;"/>
58    </Rule>
59    <Rule>
60      <Filter>[cond]='customers' and [parking] = 'surface'</Filter>
61      &maxscale_zoom16;
62      <PolygonPatternSymbolizer file="&symbols;/parking_area_cust.png"/>
63    </Rule>
64    <Rule>
65      <Filter>[cond]='customers' and [parking] = 'multistorey'</Filter>
66      &maxscale_zoom16;
67      <PolygonPatternSymbolizer file="&symbols;/parking_multistorey_cust.png"/>
68    </Rule>
69    <Rule>
70      <Filter>[cond]='customers' and [parking] = 'underground'</Filter>
71      &maxscale_zoom16;
72      <PolygonPatternSymbolizer file="&symbols;/parking_underground_cust.png"/>
73    </Rule>
74
75    <!-- parking area: residents -->
76    <Rule>
77      <Filter>[cond]='residents'</Filter>
78      &maxscale_zoom10;
79      &minscale_zoom15;
80      <PolygonSymbolizer fill="&pa_residents;" fill-opacity="&pa_fill_opacity;"/>
81      <LineSymbolizer stroke="&pa_residents_stroke;" stroke-width="&pa_stroke_width;" stroke-opacity="&pa_stroke_opacity;"/>
82    </Rule>
83    <Rule>
84      <Filter>[cond]='residents' and [parking] = 'surface'</Filter>
85      &maxscale_zoom16;
86      <PolygonPatternSymbolizer file="&symbols;/parking_area_resi.png"/>
87    </Rule>
88    <Rule>
89      <Filter>[cond]='residents' and [parking] = 'multistorey'</Filter>
90      &maxscale_zoom16;
91      <PolygonPatternSymbolizer file="&symbols;/parking_multistorey_resi.png"/>
92    </Rule>
93    <Rule>
94      <Filter>[cond]='residents' and [parking] = 'underground'</Filter>
95      &maxscale_zoom16;
96      <PolygonPatternSymbolizer file="&symbols;/parking_underground_resi.png"/>
97    </Rule>
98
99    <!-- parking area: private -->
100    <Rule>
101      <Filter>[cond]='private'</Filter>
102      &maxscale_zoom10;
103      &minscale_zoom15;
104      <PolygonSymbolizer fill="&pa_private;" fill-opacity="&pa_fill_opacity;"/>
105      <LineSymbolizer stroke="&pa_private_stroke;" stroke-width="&pa_stroke_width;" stroke-opacity="&pa_stroke_opacity;"/>
106    </Rule>
107    <Rule>
108      <Filter>[cond]='private' and [parking] = 'surface'</Filter>
109      &maxscale_zoom16;
110      <PolygonPatternSymbolizer file="&symbols;/parking_area_priv.png"/>
111    </Rule>
112    <Rule>
113      <Filter>[cond]='private' and [parking] = 'multistorey'</Filter>
114      &maxscale_zoom16;
115      <PolygonPatternSymbolizer file="&symbols;/parking_multistorey_priv.png"/>
116    </Rule>
117    <Rule>
118      <Filter>[cond]='private' and [parking] = 'underground'</Filter>
119      &maxscale_zoom16;
120      <PolygonPatternSymbolizer file="&symbols;/parking_underground_priv.png"/>
121    </Rule>
122
123    <!-- parking area: free -->
124    <Rule>
125      <Filter>[cond] = 'free'</Filter>
126      &maxscale_zoom10;
127      &minscale_zoom15;
128      <PolygonSymbolizer fill="&pa_free;" fill-opacity="&pa_fill_opacity;"/>
129      <LineSymbolizer stroke="&pa_free_stroke;" stroke-width="&pa_stroke_width;" stroke-opacity="&pa_stroke_opacity;"/>
130    </Rule>
131    <Rule>
132      <Filter>[cond] = 'free' and [parking] = 'surface'</Filter>
133      &maxscale_zoom16;
134      <PolygonPatternSymbolizer file="&symbols;/parking_area_free.png"/>
135    </Rule>
136    <Rule>
137      <Filter>[cond] = 'free' and [parking] = 'multistorey'</Filter>
138      &maxscale_zoom16;
139      <PolygonPatternSymbolizer file="&symbols;/parking_multistorey_free.png"/>
140    </Rule>
141    <Rule>
142      <Filter>[cond] = 'free' and [parking] = 'underground'</Filter>
143      &maxscale_zoom16;
144      <PolygonPatternSymbolizer file="&symbols;/parking_underground_free.png"/>
145    </Rule>
146
147    <Rule>
148      <ElseFilter/>
149      &maxscale_zoom10;
150      &minscale_zoom15;
151      <PolygonSymbolizer fill="&pa_unknown;" fill-opacity="&pa_fill_opacity;"/>
152      <LineSymbolizer stroke="&pa_unknown_stroke;" stroke-width="&pa_stroke_width;" stroke-opacity="&pa_stroke_opacity;"/>
153    </Rule>
154    <Rule>
155      <ElseFilter/>
156      <Filter>[parking] = 'surface'</Filter>
157      &maxscale_zoom16;
158      <PolygonPatternSymbolizer file="&symbols;/parking_area_unkn.png"/>
159    </Rule>
160    <Rule>
161      <ElseFilter/>
162      <Filter>[parking] = 'multistorey'</Filter>
163      &maxscale_zoom16;
164      <PolygonPatternSymbolizer file="&symbols;/parking_multistorey_unkn.png"/>
165    </Rule>
166    <Rule>
167      <ElseFilter/>
168      <Filter>[parking] = 'underground'</Filter>
169      &maxscale_zoom16;
170      <PolygonPatternSymbolizer file="&symbols;/parking_underground_unkn.png"/>
171    </Rule>
172</Style>
173
174<!--
175fee [y,n,-] = SUBSTRING(COALESCE(tags->fee,'-'),1,1)
176access [Private,Residents,Customers,-] = SUBSTRING(COALESCE(tags->access,'-'),1,1)
177condition [Ticket,Disk,Free,Private,Residents,Customers,-] = SUBSTRING(COALESCE(tags->'parking:condition:area','-'),1,1)
178
179FAC = SUBSTRING(COALESCE(tags->fee,'-'),1,1) || SUBSTRING(COALESCE(tags->access,'-'),1,1) || SUBSTRING(COALESCE(tags->'parking:condition:area','-'),1,1)
180
181fee (new) - [parking:condition:area] = 'ticket'
182fee (old) - [amenity] = 'parking' and [fee]='yes'
183disc - [parking:condition:area]='disc'
184customers - [amenity]='parking' and ([parking:condition:area]='customers' or [access]='customers')
185residents - [amenity] = 'parking' and ([parking:condition:area]='residents' or [access]='residents')
186private - [amenity] = 'parking' and ([parking:condition:area]='private' or [access]='private' or [access]='permissive')
187free (new) - [parking:condition:area] = 'free'
188free (old) - [amenity] = 'parking' and [fee]='no'
189ElseFilter
190
191Fehlt noch: maxstay auswerten -> disc
192Für inline string-replace nutzen: overlay(string placing string from int [for int])
193
194altes select mit tags->amenity:
195      (SELECT way,(tags->'amenity') AS "amenity",(tags->'tourism') AS "tourism",(tags->'name') AS "name",(tags->'fee') AS "fee",(tags->'access') AS "access",(tags->'parking:condition:area') AS "parking:condition:area",
196        CASE /* fee-access-condition= */ LOWER(SUBSTRING(COALESCE(tags->'fee','-'),1,1) || SUBSTRING(COALESCE(tags->'access','-'),1,1) || SUBSTRING(COALESCE(tags->'parking:condition:area','-'),1,1))
197...
198      where
199          (tags ? 'amenity') AND (tags->'amenity') in ('parking')
200          or (tags ? 'tourism') AND (tags->'tourism') in ('camp_site','caravan_site','picnic_site')
201      ) as parking
202
203-->
204
205<Layer name="parking-area" status="on" srs="&osm2pgsql_projection;">
206    <StyleName>parking-area</StyleName>
207    <Datasource>
208      <Parameter name="table">
209      (SELECT way,amenity,tourism,name,(tags->'fee') AS "fee",access,(tags->'parking:condition:area') AS "parking:condition:area",
210        CASE /* parking= */ LOWER(COALESCE(tags->'parking','surface'))
211        WHEN 'surface' THEN 'surface'
212        WHEN 'multi-storey' THEN 'multistorey'
213        WHEN 'underground' THEN 'underground'
214        WHEN 'sheds' THEN 'surface'
215        WHEN 'carports' THEN 'surface'
216        WHEN 'garages' THEN 'surface'
217            ELSE 'surface'
218        END AS "parking",
219        CASE /* fee-access-condition= */ LOWER(SUBSTRING(COALESCE(tags->'fee','-'),1,1) || SUBSTRING(COALESCE(access,'-'),1,1) || SUBSTRING(COALESCE(tags->'parking:condition:area','-'),1,1))
220        WHEN '--t' THEN 'ticket'
221        WHEN 'y--' THEN 'ticket'
222        WHEN 'yc-' THEN 'ticket' /* access=customers fee=yes */
223        WHEN 'y-c' THEN 'ticket' /* access=customers fee=yes */
224        WHEN 'ycc' THEN 'ticket' /* access=customers fee=yes */
225        WHEN 'y-t' THEN 'ticket'
226        WHEN '--d' THEN 'disc'
227        WHEN 'n-d' THEN 'disc'
228        WHEN '--c' THEN 'customers'
229        WHEN '-c-' THEN 'customers'
230        WHEN '-cc' THEN 'customers'
231        WHEN 'n-c' THEN 'customers'
232        WHEN 'nc-' THEN 'customers'
233        WHEN 'ncc' THEN 'customers'
234        WHEN '-r-' THEN 'residents'
235        WHEN '--r' THEN 'residents'
236        WHEN '-rr' THEN 'residents'
237        WHEN 'nr-' THEN 'residents'
238        WHEN 'n-r' THEN 'residents'
239        WHEN 'nrr' THEN 'residents'
240        WHEN '-p-' THEN 'private'
241        WHEN '--p' THEN 'private'
242        WHEN '-pp' THEN 'private'
243        WHEN 'np-' THEN 'private'
244        WHEN 'n-p' THEN 'private'
245        WHEN 'npp' THEN 'private'
246        WHEN '--f' THEN 'free'
247        WHEN 'n--' THEN 'free'
248        WHEN 'n-f' THEN 'free'
249            ELSE 'unknown'
250        END AS "cond"
251      from &prefix;_polygon
252      where
253          amenity in ('parking')
254          or tourism in ('camp_site','caravan_site','picnic_site')
255      ) as parking
256      </Parameter>
257      &datasource-settings;
258    </Datasource>
259</Layer>
260
261<Layer name="parking-area-top" status="on" srs="&osm2pgsql_projection;">
262    <StyleName>parking-area</StyleName>
263    <Datasource>
264      <Parameter name="table">
265      (SELECT way,amenity,tourism,name,(tags->'fee') AS "fee",access,(tags->'parking:condition:area') AS "parking:condition:area",
266        CASE /* parking= */ LOWER(COALESCE(tags->'parking','surface'))
267        WHEN 'surface' THEN 'surface'
268        WHEN 'multi-storey' THEN 'multistorey'
269        WHEN 'underground' THEN 'underground'
270        WHEN 'sheds' THEN 'surface'
271        WHEN 'carports' THEN 'surface'
272        WHEN 'garages' THEN 'surface'
273            ELSE 'surface'
274        END AS "parking",
275        CASE /* fee-access-condition= */ LOWER(SUBSTRING(COALESCE(tags->'fee','-'),1,1) || SUBSTRING(COALESCE(access,'-'),1,1) || SUBSTRING(COALESCE(tags->'parking:condition:area','-'),1,1))
276        WHEN '--t' THEN 'ticket'
277        WHEN 'y--' THEN 'ticket'
278        WHEN 'yc-' THEN 'ticket' /* access=customers fee=yes */
279        WHEN 'y-c' THEN 'ticket' /* access=customers fee=yes */
280        WHEN 'ycc' THEN 'ticket' /* access=customers fee=yes */
281        WHEN 'y-t' THEN 'ticket'
282        WHEN '--d' THEN 'disc'
283        WHEN 'n-d' THEN 'disc'
284        WHEN '--c' THEN 'customers'
285        WHEN '-c-' THEN 'customers'
286        WHEN '-cc' THEN 'customers'
287        WHEN 'n-c' THEN 'customers'
288        WHEN 'nc-' THEN 'customers'
289        WHEN 'ncc' THEN 'customers'
290        WHEN '-r-' THEN 'residents'
291        WHEN '--r' THEN 'residents'
292        WHEN '-rr' THEN 'residents'
293        WHEN 'nr-' THEN 'residents'
294        WHEN 'n-r' THEN 'residents'
295        WHEN 'nrr' THEN 'residents'
296        WHEN '-p-' THEN 'private'
297        WHEN '--p' THEN 'private'
298        WHEN '-pp' THEN 'private'
299        WHEN 'np-' THEN 'private'
300        WHEN 'n-p' THEN 'private'
301        WHEN 'npp' THEN 'private'
302        WHEN '--f' THEN 'free'
303        WHEN 'n--' THEN 'free'
304        WHEN 'n-f' THEN 'free'
305            ELSE 'unknown'
306        END AS "cond"
307      from &prefix;_polygon
308      where
309          amenity in ('parking')
310          or tourism in ('camp_site','caravan_site','picnic_site')
311      ) as parking
312      </Parameter>
313      &datasource-settings;
314    </Datasource>
315</Layer>
316
317<Style name="parking-area-text">
318    <Rule>
319      <Filter>[amenity] = 'parking'</Filter>
320      &maxscale_zoom14;
321      &minscale_zoom18;
322      <TextSymbolizer fontset-name="book-fonts" size="8" fill="#101010" dy="0" halo-radius="1" wrap-width="20">[parkname]</TextSymbolizer>
323    </Rule>
324</Style>
325
326<!--
327old select:
328      (SELECT way,(tags->'amenity') AS "amenity",(tags->'tourism') AS "tourism",(tags->'name') AS "name",(tags->'fee') AS "fee",(tags->'access') AS "access",(tags->'parking:condition:area') AS "parking:condition:area",
329        (COALESCE(tags->'name',tags->'parking:condition:area:customers',tags->'operator','')
330        /* || ' (' || LOWER(SUBSTRING(COALESCE(tags->'fee','-'),1,1) || SUBSTRING(COALESCE(tags->'access','-'),1,1) || SUBSTRING(COALESCE(tags->'parking:condition:area','-'),1,1)) || ')' */
331        ) AS "parkname"
332      from &prefix;_polygon
333      where
334          (tags ? 'amenity') AND (tags->'amenity') in ('parking')
335          or (tags ? 'tourism') AND (tags->'tourism') in ('camp_site','caravan_site','picnic_site')
336      ) as parking
337-->
338<Layer name="parking-area-text" status="on" srs="&osm2pgsql_projection;">
339    <StyleName>parking-area-text</StyleName>
340    <Datasource>
341      <Parameter name="table">
342      (SELECT way,amenity,tourism,name,(tags->'fee') AS "fee",access,(tags->'parking:condition:area') AS "parking:condition:area",
343        (COALESCE(name,tags->'parking:condition:area:customers',operator,'')
344        /* || ' (' || LOWER(SUBSTRING(COALESCE(tags->'fee','-'),1,1) || SUBSTRING(COALESCE(access,'-'),1,1) || SUBSTRING(COALESCE(tags->'parking:condition:area','-'),1,1)) || ')' */
345        ) AS "parkname"
346      from &prefix;_polygon
347      where
348          amenity in ('parking')
349          or tourism in ('camp_site','caravan_site','picnic_site')
350      ) as parking
351      </Parameter>
352      &datasource-settings;
353    </Datasource>
354</Layer>
Note: See TracBrowser for help on using the repository browser.