source: subversion/applications/rendering/nor-screenspec/layer-buildings.xml.ent @ 34655

Last change on this file since 34655 was 25645, checked in by vibrog, 8 years ago

Generalize matching of leisure(=sports_centre,stadium,ice_rink) buildings

File size: 2.9 KB
Line 
1<Style name="buildings">
2  <!-- Commercial and public buildings -->
3  <Rule>
4    <Filter>[building]='commercial' or [man_made]='works' or [amenity]!='' or [shop]!='' or [tourism]!='' or [leisure]!='' or [railway]='station' or [aeroway]!=''</Filter>
5    &maxscale_zoom13;
6    <PolygonSymbolizer>
7      <CssParameter name="fill">#5a87de</CssParameter>
8    </PolygonSymbolizer>
9  </Rule>
10  <!-- Domestic -->
11  <Rule>
12    <Filter>[building]='residential'</Filter>
13    &maxscale_zoom15;
14    <PolygonSymbolizer>
15      <CssParameter name="fill">#9a5f21</CssParameter>
16    </PolygonSymbolizer>
17  </Rule>
18  <!-- Temporary residences, summer houses, cottages -->
19  <Rule>
20    <Filter>[building]='hut'</Filter>
21    &maxscale_zoom15;
22    <PolygonSymbolizer>
23      <CssParameter name="fill">#d68723</CssParameter>
24    </PolygonSymbolizer>
25  </Rule>
26  <!-- Default/unclassified -->
27  <Rule>
28    <Filter>([building]!='' and not ([building]='commercial' or [building]='residential' or [building]='hut' or [amenity]!='' or [shop]!='' or [tourism]!='' or [leisure]!='' or [man_made]!='' or [railway]!='' or [aeroway]!='')) or [military]!='' or [historic]='castle'</Filter>
29    &maxscale_zoom13;
30    <PolygonSymbolizer>
31      <CssParameter name="fill">#9a5f21</CssParameter>
32    </PolygonSymbolizer>
33  </Rule>
34  <!-- Tanks (not really buildings) -->
35  <Rule>
36    <Filter>[man_made]='storage_tank' or [man_made]='silo' or [man_made]='water_tower'</Filter>
37    &maxscale_zoom15;
38    <PolygonSymbolizer>
39      <CssParameter name="fill">#828282</CssParameter>
40    </PolygonSymbolizer>
41  </Rule>
42  <Rule>
43    &maxscale_zoom16;
44    <LineSymbolizer>
45      <CssParameter name="stroke">#000</CssParameter>
46      <CssParameter name="stroke-width">0.4</CssParameter>
47    </LineSymbolizer>
48  </Rule>
49</Style>
50
51<Layer name="buildings" status="on" srs="&osm2pgsql_projection;">
52  <StyleName>buildings</StyleName>
53  <Datasource>
54    <Parameter name="table">
55    (select way,man_made,amenity,railway,aeroway,military,leisure,shop,tourism,historic,
56      case
57        when building in ('house','detached','terrace','apartments','garage','garages') then 'residential'::text
58        when building in ('office','manufacture','factory','industrial','greenhouse','hangar','supermarket','store','retail','public','school','university','hall','service') then 'commercial'::text
59        when building in ('cabin','pavilion','canopy') then 'hut'::text
60        else building
61      end as building
62     from &prefix;_polygon
63     where building is not null
64        and building!='no'
65        or man_made in ('works','storage_tank','silo','water_tower')
66        or amenity in ('place_of_worship','public_building','townhall','courthouse')
67        or railway='station'
68        or aeroway in ('terminal','hangar')
69        or military in ('barracks','bunker')
70        or historic='castle'
71     order by z_order,way_area desc) as buildings
72    </Parameter>
73    &datasource-settings;
74  </Datasource>
75</Layer>
Note: See TracBrowser for help on using the repository browser.