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

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

Simplify building selectors

File size: 1.9 KB
Line 
1<Style name="buildings">
2  <Rule>
3    <Filter>([building]!='' and not ([building]='residential' or [building]='hut')) or [man_made]='works' or [amenity]!='' or [railway]='station' or [aeroway]!='' or [military]!='' or [historic]='castle'</Filter>
4    &maxscale_zoom13;
5    <PolygonSymbolizer>
6      <CssParameter name="fill">#333</CssParameter>
7    </PolygonSymbolizer>
8  </Rule>
9  <Rule>
10    <Filter>[building]='residential' or [building]='hut'</Filter>
11    &maxscale_zoom15;
12    <PolygonSymbolizer>
13      <CssParameter name="fill">#666</CssParameter>
14    </PolygonSymbolizer>
15  </Rule>
16  <Rule>
17    <Filter>[man_made]='storage_tank' or [man_made]='silo' or [man_made]='water_tower'</Filter>
18    &maxscale_zoom15;
19    <PolygonSymbolizer>
20      <CssParameter name="fill">#828282</CssParameter>
21    </PolygonSymbolizer>
22  </Rule>
23  <Rule>
24    &maxscale_zoom16;
25    <LineSymbolizer>
26      <CssParameter name="stroke">#000</CssParameter>
27      <CssParameter name="stroke-width">0.5</CssParameter>
28    </LineSymbolizer>
29  </Rule>
30</Style>
31
32<Layer name="buildings" status="on" srs="&osm2pgsql_projection;">
33  <StyleName>buildings</StyleName>
34  <Datasource>
35    <Parameter name="table">
36    (select way,man_made,amenity,railway,aeroway,military,historic,
37      case
38        when building in ('house','detached','terrace','apartments','garage','garages') then 'residential'::text
39        when building in ('cabin','pavilion','canopy') then 'hut'::text
40        else building
41      end as building
42     from &prefix;_polygon
43     where building is not null
44        and building!='no'
45        or man_made in ('works','storage_tank','silo','water_tower')
46        or amenity in ('place_of_worship','public_building','townhall','courthouse')
47        or railway='station'
48        or aeroway in ('terminal','hangar')
49        or military in ('barracks','bunker')
50        or historic='castle'
51     order by z_order,way_area desc) as buildings
52    </Parameter>
53    &datasource-settings;
54  </Datasource>
55</Layer>
Note: See TracBrowser for help on using the repository browser.