-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathExtruded-buildings.sld
78 lines (71 loc) · 2.57 KB
/
Extruded-buildings.sld
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
76
77
78
<?xml version='1.0' encoding='ISO-8859-1'?>
<StyledLayerDescriptor version='1.0.0' xmlns='http://www.opengis.net/sld' xmlns:ogc='http://www.opengis.net/ogc'
xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd'>
<NamedLayer>
<Name>Extruded Buildings</Name>
<UserStyle>
<Title>Pseudo 3D polygon style</Title>
<Abstract>Example code</Abstract>
<!-- The following rule adds the building shadows -->
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Geometry>
<ogc:Function name='offset'>
<ogc:PropertyName>the_geom</ogc:PropertyName>
<ogc:Literal>3</ogc:Literal>
<ogc:Literal>-3</ogc:Literal>
</ogc:Function>
</Geometry>
<Fill>
<CssParameter name='fill'>#555555</CssParameter>
<CssParameter name='opacity'>0.15</CssParameter>
</Fill>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
<!-- The following rule extrudes the polygons to create the sides of the buildings -->
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Geometry>
<ogc:Function name='isometric'>
<ogc:PropertyName>the_geom</ogc:PropertyName>
<ogc:Literal>5</ogc:Literal>
</ogc:Function>
</Geometry>
<Fill>
<CssParameter name='fill'>#E0D5C7</CssParameter>
</Fill>
<Stroke>
<CssParameter name='stroke'>#CEC5BC</CssParameter>
<CssParameter name='stroke-width'>0.1</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
<!-- The following rule adds a roof to the buildings -->
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Geometry>
<ogc:Function name='offset'>
<ogc:PropertyName>the_geom</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal>
<ogc:Literal>5</ogc:Literal>
</ogc:Function>
</Geometry>
<Fill>
<CssParameter name='fill'>#F2E6D4</CssParameter>
</Fill>
<Stroke>
<CssParameter name='stroke'>#C6BDB5</CssParameter>
<CssParameter name='stroke-width'>0.3</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>