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

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

Improve building class selectors

File size: 2.5 KB
Line 
1<Style name="buildings">
2  <!-- Commercial and public buildings -->
3  <Rule>
4    <Filter>[building]='commercial' or [man_made]!='' or [amenity]!='' or [shop]!='' or [tourism]!='' or [leisure]='stadium' or [leisure]='sports_centre' or [railway]='station' or [aeroway]='terminal' or [aeroway]='hangar'</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</Style>
35
36<Layer name="buildings" status="on" srs="&osm2pgsql_projection;">
37  <StyleName>buildings</StyleName>
38  <Datasource>
39    <Parameter name="table">
40    (select way,man_made,amenity,railway,aeroway,military,leisure,shop,tourism,historic,
41      case
42        when building in ('house','detached','terrace','apartments','garage','garages') then 'residential'::text
43        when building in ('office','manufacture','factory','industrial','greenhouse','hangar','supermarket','store','retail','public','hall','service') then 'commercial'::text
44        when building in ('cabin','pavilion','canopy') then 'hut'::text
45        else building
46      end as building
47     from &prefix;_polygon
48     where building is not null
49        and building!='no'
50        or man_made in ('works','storage_tank','silo','water_tower')
51        or amenity in ('place_of_worship','public_building','townhall','courthouse')
52        or railway='station'
53        or aeroway in ('terminal','hangar')
54        or military in ('barracks','bunker')
55        or historic='castle'
56     order by z_order,way_area desc) as buildings
57    </Parameter>
58    &datasource-settings;
59  </Datasource>
60</Layer>
Note: See TracBrowser for help on using the repository browser.