source: subversion/applications/rendering/nor-hikingmap/layer-buildings.xml.ent @ 25628

Last change on this file since 25628 was 25628, checked in by vibrog, 9 years ago

Improve building selectors and dim residential buildings

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