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