<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD Simplified DocBook XML V4.1.2.5//EN"
"http://www.oasis-open.org/docbook/xml/simple/4.1.2.5/sdocbook.dtd">
<section id="sld">
    <title>Styled Layer Descriptor</title>
  <section id="intro">
    <title>Introduction</title>

    <para>This section provides a simple overview of the Styled Layer
    Descriptor (SLD) specification from the Open GIS Consortium (OGC). The
    implementation of SLD in GeoTools2 is then discussed and a series of
    examples are shown.</para>
  </section>

  <section id="symbolizers">
    <title>Symbolizers</title>

    <para>A synbolizer is used to convert a feature to a &#34;picture&#34;,
    that is, it describes what the feature is to look like when rendered to an
    output device. Since different renderers have different capabilities the
    descriptions of the symbolization are necessarily platform independent and
    a bit absract in places. A symbolizer is also resposnsible for determining
    what sort of symbol is drawn.</para>

    <para>There are, currently, five types of symbolizer defined in the SLD
    spec. These are</para>

    <orderedlist>
      <listitem>
        <para>Point symbolizer</para>
      </listitem>

      <listitem>
        <para>Line symbolizer</para>
      </listitem>

      <listitem>
        <para>Polygon symbolizer</para>
      </listitem>

      <listitem>
        <para>Text symbolizer</para>
      </listitem>

      <listitem>
        <para>Raster symbolizer</para>
      </listitem>
    </orderedlist>

    <para>GeoTools2 currently implements the first four of these but
    <emphasis>not</emphasis> the Raster symboliser. A SLD document will
    request a default symboliser and then override the default behaviour with
    supplied parameters. In Geotools2 this is reperesented using the
    Symbolizer class in the org.geotools.styling package. Each of the specific
    types of symbolizer is implemented as a Default<emphasis>Name</emphasis>Symbolizer
    class, e.g. DefaultLineSymbolizer. Each type of symbolizer has different
    parameters that are used to describe the way to draw the feature.</para>
  </section>

  <section>
    <title>Point Symbolizer</title>

    <para>A point symbolizer describes a &#34;graphic&#34; which is to be
    drawn at some point. The default symbolizer (<ulink
    url="..../defaultcore/src/org/geotools/styling/DefaultPointStyler.java">org.geotools.styling.DefaultPointStyler.java</ulink>)
    will draw nothing, so you must add a Graphic element, The whole of a point
    symbolizer is a an optional geometry and an optional graphic. The geometry
    element is to tell the symbolizer which geometry attribute of the feature
    to use. If it is missing then the default geometry of the feature will be
    used.</para>

    <para>A graphic (<ulink
    url="../../defaultcore/org/geotools/styling/DefaultGraphic.java">org.geotools.styling.DefaultGraphic.java</ulink>)
    is an object which holds a list of zero or more external graphics and
    marks, and infomation on the size, rotation and opacity of the graphic. A
    renderer will work through the list of <link linkend="extgraph">external
    graphics</link> comparing the formats it can render with the graphics
    format, if it can the image will be fetched and rendered, if not then the
    next external graphic in the list will be tryed. If the list of external
    graphics is exhausted the renderer will begin to work through the list of
    <link linkend="marks">marks</link> agian checking if it can render each
    mark in turn, if that fails a default mark of a square will be used.</para>

    <para>The size parameter sets what size the external graphic or mark will
    be drawn. If it is not set then external graphics will be drawn at thier
    inherent size if they have one or 16 pixels high if not, the default size
    of a mark is 6 pixels square. Opacity describes how opaque the graphic is
    with 0.0 being completly transparent and 1.0 being completly solid. The
    default opacity is 1.0. Rotation gives the rotation of the graphic in
    degrees clockwise about the centre of the graphic. All three of these
    elements are expressions so can be dependent on attributes of the feature
    being rendered or can be static litterals.</para>

    <section>
      <title id="extgraph">External Graphics</title>

      <para>An external graphic
      (org.geotools.styling.DefaultExternalGraphic.java) simply holds a url
      refering to the image to be drawn (using xlink) and a format string that
      describes the image&#39;s mime type. The format string allows the
      renderer to determine if it can render an image of that type.</para>
    </section>

    <section id="marks">
      <title>Marks</title>

      <para>A mark describes a shape which can be <link linkend="fill">filled</link>
      and <link linkend="stroke">stroked.</link> Basically the fill describes
      the colour of the mark and the stroke describes the outline of it.</para>

      <para>Figure <systemitem>1</systemitem> shows a collection of marks
      rendered using the following sld</para>

      <programlisting> this is a program list </programlisting>

      <figure float="1" id="figmark">
        <title>Example of Marks</title>

        <mediaobject>
          <imageobject>
            <imagedata width="100" fileref="images/marks.gif" />
          </imageobject>
        </mediaobject>
      </figure>
    </section>
  </section>

  <section>
    <title>Line Symbolizer</title>

    <para></para>
  </section>

  <section>
    <title id="fill">Fill</title>

    <para></para>
  </section>

  <section>
    <title id="stroke">Stroke</title>

    <para></para>
  </section>
</section>
