Download presentation
Presentation is loading. Please wait.
Published bySamuel Sutton Modified over 9 years ago
1
Styled Layer Descriptor (SLD) or How I Learned To Stop Worrying and Love XML Mike Pumphrey FOSS4G, Sydney, Australia October 23, 2009 1
2
2
3
Geospatial data has no inherent visualization 3
4
We are all designers now. (Oh no.) 4
5
Style (noun/verb) : 1.The way in which something is said, done, expressed, or performed. 2.A customary manner of presenting material. 3.The missing piece that turns geospatial data into a completed map. 5
6
Ways to style maps Mapfile AXL ArcGIS Style files etc... 6
7
Styled Layer Descriptor (SLD) 7
8
OGC standard (and we do love standards) 8
9
<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" 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"> topp:street_centerline feat_type 0 1890 XML? Really? 9
10
XML: Computers v. Humans Computer “Ooh, this is easy to read and output. I like this. “ Human “Oh dear, it looks like it was written by the Society for Far Too Much Verbosity and Redundancy Society.” 10
11
How to Get By and also a preview of the future of styling with SLD 11
12
What’s in an SLD file? 1.Symbology (Symbolizers) – Rules for drawing: Point/Line/Polygon/Text/Raster 2.Metadata – Name/Title/Abstract 12
13
An SLD... 13
14
Map Information... 14
15
Metadata town_street_1 Town Streets If you want to know all about the streets in this town, this layer is for you. 15
16
Remember: Don’t forget to call home Brush and floss twice a day Create metadata 16
17
Symbology … … … … 17
18
Symbology: Points Shape circle 18
19
Symbology: Points Size 36 19
20
Symbology: Points Inside (Fill) #FF0000 20
21
Symbology: Points Graphic image/png 21
22
Symbology: Points Outside (Stroke) #000000 2 22
23
Symbology: Polygons Inside (Fill) #00FF00 23
24
Symbology: Polygons Outside (Stroke) #FF0080 5 24
25
Symbology: Lines Q: and for lines? A: Fake it. 25
26
Symbology: Lines Two lines = simulated fill/stroke #000000 16 #0000FF 14 26
27
Symbology: Lines + = Two lines = simulated fill/stroke 27
28
Symbology: Lines Uh oh. 28
29
Symbology: Lines #000000 16 #0000FF 14 29
30
Symbology: Lines Ahhh. 30
31
Symbology: Text 31
32
Symbology: Text name Label content 32
33
Symbology: Text Font (size, color, weight) Arial 12 normal bold 33
34
Symbology: Text Placement 0.5 0 15 34
35
Symbology: Text With points: 35
36
Symbology: Text With polygons: 36
37
Symbology: Text With lines? 37
38
Symbology: Text Vendor Options! true 38
39
Symbology: Text true 60 100 30 50 etc... 39
40
Symbology: Raster Digital Elevation Model 40
41
Symbology: Raster Digital Elevation Model 41
42
Attribute-based styling Customize feature display Show only what you want to show 42
43
Attribute-based styling 43
44
Attribute-based styling Filters apply to Rules, not individual symbolizers name Thisland... 44
45
Zoom-based styling Display at certain zoom levels 1000 10000 45
46
Zoom-and-attribute-based styling This gets messy: M filters at N zoom levels = M x N rules! 46
47
Alternatives to coding by hand (yay!) 47
48
uDig 48
49
Styler 49
50
CSS to SLD 50
51
Questions? 51
52
Styled Layer Descriptor (SLD) or How I Learned To Stop Worrying and Love XML Mike Pumphrey mike@opengeo.org Thanks! 52
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.