Geospatial data has no inherent visualization
-
Upload
jacob-miranda -
Category
Documents
-
view
25 -
download
0
description
Transcript of Geospatial data has no inherent visualization
![Page 1: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/1.jpg)
<Presentation xmlns=http://2009.foss4g.org/><Name>
<Title>
<Literal>Styled Layer Descriptor (SLD)</Literal></Title><Subtitle>
<Literal>or How I Learned To Stop Worrying and Love XML</Literal></Subtitle>
</Name><Presenter>
<Literal>Mike Pumphrey</Literal></Presenter><Occasion>
<Literal>FOSS4G, Sydney, Australia</Literal></Occasion><Date>
<Literal>October 23, 2009</Literal></Date>
</Presentation>
1
![Page 2: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/2.jpg)
2
![Page 3: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/3.jpg)
Geospatial datahas no inherent visualization
3
![Page 4: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/4.jpg)
We are all designers now.(Oh no.)
4
![Page 5: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/5.jpg)
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
![Page 6: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/6.jpg)
Ways to style maps
• Mapfile• AXL• ArcGIS Style files• etc...
6
![Page 7: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/7.jpg)
Styled Layer Descriptor (SLD)
7
![Page 8: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/8.jpg)
OGC standard
(and we do love standards)
8
![Page 9: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/9.jpg)
<?xml version = '1.0' encoding = 'UTF-8'?><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"> <NamedLayer xmlns="http://www.opengis.net/sld"> <Name xmlns="http://www.opengis.net/sld">topp:street_centerline</Name> <UserStyle xmlns="http://www.opengis.net/sld"><!-- ++++++++++++++++++ Small paths - Outline --><!-- Paths OL Start of 1890 Zoom, covers 793 and below --> <FeatureTypeStyle xmlns="http://www.opengis.net/sld"> <Rule xmlns="http://www.opengis.net/sld"> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:PropertyIsLessThan xmlns:ogc="http://www.opengis.net/ogc"> <ogc:PropertyName xmlns:ogc="http://www.opengis.net/ogc">feat_type</ogc:PropertyName> <ogc:Literal xmlns:ogc="http://www.opengis.net/ogc">0</ogc:Literal> </ogc:PropertyIsLessThan> </ogc:Filter> <MaxScaleDenominator xmlns="http://www.opengis.net/sld">1890</MaxScaleDenominator> <LineSymbolizer xmlns="http://www.opengis.net/sld"> <Stroke xmlns="http://www.opengis.net/sld">
XML? Really?
9
![Page 10: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/10.jpg)
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
![Page 11: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/11.jpg)
How to Get By
and also a preview of thefuture of styling with SLD
11
![Page 12: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/12.jpg)
What’s in an SLD file?
1. Symbology (Symbolizers)– Rules for drawing: Point/Line/Polygon/Text/Raster
2. Metadata– Name/Title/Abstract
12
![Page 13: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/13.jpg)
An SLD<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" … >
<NamedLayer>
<UserStyle>
<FeatureTypeStyle>
<Rule>
...
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
13
![Page 14: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/14.jpg)
Map Information<StyledLayerDescriptor>
<NamedLayer>
<UserStyle>
...
14
![Page 15: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/15.jpg)
Metadata
<UserStyle>
<Name>town_street_1</Name>
<Title>Town Streets</Title>
<Abstract>If you want to know all about the streets in this town, this layer is for you.</Abstract>
15
![Page 16: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/16.jpg)
Remember:
• Don’t forget to call home• Brush and floss twice a day• Create metadata
16
![Page 17: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/17.jpg)
Symbology
<FeatureTypeStyle><Rule>
…
<FeatureTypeStyle>
<Rule>
…
</Rule>
<Rule>
…
</Rule>
</FeatureTypeStyle>
…
17
![Page 18: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/18.jpg)
Symbology: Points
Shape
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>
circle
</WellKnownName>
</Mark>
</Graphic>
</PointSymbolizer>
18
![Page 19: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/19.jpg)
Symbology: Points
Size
<Size>36</Size>
19
![Page 20: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/20.jpg)
Symbology: Points
Inside (Fill)
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
20
![Page 21: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/21.jpg)
Symbology: Points
Graphic
<ExternalGraphic>
<OnlineResource xlink:type=“simple” link:href="smileyface.png" />
<Format>image/png</Format>
</ExternalGraphic>
21
![Page 22: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/22.jpg)
Symbology: Points
Outside (Stroke)
<Stroke>
<CssParameter name=“stroke”>#000000</CssParameter>
<CssParameter name=“stroke-width”>2</CssParameter>
</Stroke>
22
![Page 23: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/23.jpg)
Symbology: Polygons
Inside (Fill)
<Fill>
<CssParameter name="fill">#00FF00</CssParameter>
</Fill>
23
![Page 24: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/24.jpg)
Symbology: Polygons
Outside (Stroke)
<Stroke>
<CssParameter name="stroke">#FF0080</CssParameter>
<CssParameter name="stroke-width">5</CssParameter>
</Stroke>
24
![Page 25: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/25.jpg)
Symbology: Lines
Q: <Stroke> and <Fill> for lines?A: Fake it.
25
![Page 26: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/26.jpg)
Symbology: LinesTwo lines = simulated fill/stroke<Rule> <LineSymbolizer> <Stroke> <CssParameter name="stroke">#000000</CssParameter> <CssParameter name="stroke-width">16</CssParameter> </Stroke> </LineSymbolizer></Rule><Rule> <LineSymbolizer> <Stroke> <CssParameter name="stroke">#0000FF</CssParameter> <CssParameter name="stroke-width">14</CssParameter> </Stroke> </LineSymbolizer></Rule>
26
![Page 27: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/27.jpg)
Symbology: Lines
+ =
Two lines = simulated fill/stroke
27
![Page 28: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/28.jpg)
Symbology: Lines
Uh oh.
28
![Page 29: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/29.jpg)
Symbology: Lines<FeatureTypeStyle> <Rule> <LineSymbolizer> <Stroke> <CssParameter name="stroke">#000000</CssParameter> <CssParameter name="stroke-width">16</CssParameter> </Stroke> </LineSymbolizer> </Rule></FeatureTypeStyle><FeatureTypeStyle> <Rule> <LineSymbolizer> <Stroke> <CssParameter name="stroke">#0000FF</CssParameter> <CssParameter name="stroke-width">14</CssParameter> </Stroke> </LineSymbolizer> </Rule><FeatureTypeStyle>
29
![Page 30: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/30.jpg)
Symbology: Lines
Ahhh.
30
![Page 31: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/31.jpg)
Symbology: Text
31
![Page 32: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/32.jpg)
Symbology: Text
<Label>
<ogc:PropertyName>name</ogc:PropertyName>
</Label>
Label content
32
![Page 33: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/33.jpg)
Symbology: Text
Font (size, color, weight)
<Font>
<CssParameter name="font-family">Arial</CssParameter>
<CssParameter name="font-size">12</CssParameter>
<CssParameter name="font-style">normal</CssParameter>
<CssParameter name="font-weight">bold</CssParameter>
</Font>
33
![Page 34: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/34.jpg)
Symbology: TextPlacement
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>0.5</AnchorPointX>
<AnchorPointY>0.5</AnchorPointY>
</AnchorPoint>
<Displacement>
<DisplacementX>0</DisplacementX>
<DisplacementY>15</DisplacementX>
</Displacement>
</PointPlacement>
</LabelPlacement>
34
![Page 35: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/35.jpg)
Symbology: Text
With points:
35
![Page 36: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/36.jpg)
Symbology: Text
With polygons:
36
![Page 37: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/37.jpg)
Symbology: Text
With lines?
37
![Page 38: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/38.jpg)
Symbology: Text
Vendor Options! <VendorOption name="followLine">true</VendorOption>
38
![Page 39: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/39.jpg)
Symbology: Text<VendorOption name="followLine">true</VendorOption>
<VendorOption name="maxDisplacement">60</VendorOption>
<VendorOption name="repeat">100</VendorOption>
<VendorOption name="maxAngleDelta">30</VendorOption>
<VendorOption name="autoWrap">50</VendorOption>
etc...
39
![Page 40: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/40.jpg)
Symbology: RasterDigital Elevation Model
<ColorMap>
<ColorMapEntry color="#000000" quantity="-500" opacity="0.0" />
<ColorMapEntry color="#AAFFAA" quantity="0" />
<ColorMapEntry color="#00FF00" quantity="1000"/>
<ColorMapEntry color="#FFFF00" quantity="1200" />
<ColorMapEntry color="#FF7F00" quantity="1400" />
<ColorMapEntry color="#BF7F3F" quantity="1600" />
<ColorMapEntry color="#000000" quantity="2000" />
</ColorMap>
40
![Page 41: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/41.jpg)
Symbology: RasterDigital Elevation Model
41
![Page 42: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/42.jpg)
Attribute-based styling
• Customize feature display• Show only what you want to show
42
![Page 43: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/43.jpg)
Attribute-based styling
<PropertyIsEqualTo><PropertyIsNotEqualTo><PropertyIsLessThan><PropertyIsGreaterThan><PropertyIsNull><PropertyIsLike>
43
![Page 44: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/44.jpg)
Attribute-based styling
Filters apply to Rules, not individual symbolizers
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>name</ogc:PropertyName>
<ogc:Literal>Thisland</ogc:Literal>
</ogc:PropertyIsEqualTo>
...
44
![Page 45: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/45.jpg)
Zoom-based stylingDisplay at certain zoom levels<sld:MinScaleDenominator>1000</sld:MinScaleDenominator> <sld:MaxScaleDenominator>10000</sld:MaxScaleDenominator>
45
![Page 46: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/46.jpg)
Zoom-and-attribute-based styling
This gets messy:
M filters at N zoom levels = M x N rules!
46
![Page 47: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/47.jpg)
Alternatives to coding by hand(yay!)
47
![Page 48: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/48.jpg)
uDig
48
![Page 49: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/49.jpg)
Styler
49
![Page 50: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/50.jpg)
CSS to SLD
50
![Page 51: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/51.jpg)
Questions?
51
![Page 52: Geospatial data has no inherent visualization](https://reader036.fdocuments.in/reader036/viewer/2022062517/568133d2550346895d9acb16/html5/thumbnails/52.jpg)
<Presentation xmlns=http://2009.foss4g.org/><Name>
<Title>
<Literal>Styled Layer Descriptor (SLD)</Literal></Title><Subtitle>
<Literal>or How I Learned To Stop Worrying and Love XML</Literal></Subtitle>
</Name><Presenter>
<Name>
<Literal>Mike Pumphrey</Literal></Name><Email>
<Literal>[email protected]</Literal></Email><FinalWords>
<Literal>Thanks!</Literal></FinalWords>
</Presenter></Presentation>
52