SLD层样式描述符

SLD层样式描述符


SLD(Style Layer Descriptor)样式层描述符

基于XML语言

创建样式,相对比较简单。
1. SLD Hello World
1.1 Create the SLD File----OK
1.2 Load Your New SLD  ----OK
1.3 Give a FeatureType Your New SLD---OK
View the Style---OK


2. SLD Text Symbolizers 文本符号----OK 存在问题:使用中国地图显示异常,请求样式不适用于图层,进一步操作??????
Modify the SLD File to Include Text Symbolizers
<Label>: What label to give each rendered object. Here we use an attribute of the object, "TYPE". The property name is case sensitive. 标签
<Font>: The font and size the label will have. 字体
<Fill>: The color that we will fill the font with 填充
3. Outlines and Filters -----OK
<ogc:Filter>
 <ogc:Not>
  <ogc:PropertyIsEqualTo>
   <ogc:PropertyName>TYPE</ogc:PropertyName>
   <ogc:Literal>highway</ogc:Literal>
  </ogc:PropertyIsEqualTo>
 </ogc:Not>
</ogc:Filter>

<ogc:PropertyIsLessThan>
<ogc:PropertyIsGreaterThan>

The halo is essentially a buffer outline of the text.  halo文本的晕环

4. What SLDs are, a text approach
SLD (Styled Layer Descriptor) is a specification put out by the OGC, that defines an XML language to allow users to define symbolization of their feature data. It was written to be a complement to their Web Map Service (WMS) specification, by extending it to allow users a way to define how they want to visualize their features.

Then there are 5 types of symbolizers you can use to actually portray the features,
(1)line,  线
(2)polygon, 多边形
A Polygon Symbolizer has a geometry and a stroke, just like a line symbolizer, but also has a 'fill', defining what color to put in the center. Can be straight color, or a graphic, of varying opacity and the like.
(3)point, 点
A point symbolizer is made up of a geometry and a Graphic. A graphic is made of either an External Graphic, or a Mark, and has an opacity, a size, and a rotation. Opacity is the same as for the other symbolizers, Size is the absolute size of the graphic in pixels (default is to be dynamic), and rotation defines the rotation of the graphic in the clockwise dimension in decimal degrees. A Mark has a well known name (like square, circle, star, ect.), and a fill and a stroke. An External Graphic uses an xlink to refer to the location of an resource on the web to use to represent the point.
(4)text, 文本
A text symbolizer is made up of a Geometry, a Label, a Font, a LabelPlacement, a Halo, and a Fill.
(5)and raster. 光栅
A raster symbolizer consists of a Geometry(几何学), opacity(透明度), channel selection(路线选择), overlap behavior(交叠事件), color map(颜色地图), contrast enhancement(对照增强), shaded relief(阴影浮雕) and image outline(图像轮廓).


 

你可能感兴趣的:(SLD层样式描述符)