Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Module:

mark-wkt

Module Maintainer:

~lmoran

Status:

Excerpt

(red star)(red star)(red star)(red star)(red star)

Email Help:

Geotools-gt2-users@lists.sourceforge.net

Volunteer:

geotools-devel@lists.sourceforge.net

IP Review:

review.txt

Plug-in:

DataStoreFactorySPI

...

The use of WKT marks (prefiex with "wkt://" in your SLD) allows an easy way to add complex symbols to the rendering process; for example, a double dashed line with transparent background can be shown with this SLD fragment:

          <LineSymbolizer>
            <Stroke>
              <GraphicStroke>
                <Graphic>
                  <Mark>
                    <WellKnownName>wkt://MULTILINESTRING((-0.25 -0.25, -0.125 -0.25), (0.125 -0.25, 0.25 -0.25), (-0.25 0.25, -0.125 0.25), (0.125 0.25, 0.25 0.25))</WellKnownName>
                    <Fill>
                      <CssParameter name="fill">#0000ff</CssParameter>
                    </Fill>
                    <Stroke>
                      <CssParameter name="stroke">#0000ff</CssParameter>
                      <CssParameter name="stroke-width">1</CssParameter>
                    </Stroke>
                  </Mark>
                  <Size>6</Size>
                </Graphic>
              </GraphicStroke>
            </Stroke>
          </LineSymbolizer>

Which gives this output:
This module supports curves as well; for instance, this SLD fragment:

          <LineSymbolizer>
            <Stroke>
              <GraphicStroke>
                <Graphic>
                  <Mark>
                    <WellKnownName>wkt://COMPOUNDCURVE((0 0, 0.25 0), CIRCULARSTRING(0.25 0, 0.5 0.5, 0.75 0), (0.75 0, 1 0))</WellKnownName>
                    <Fill>
                      <CssParameter name="fill">#0000ff</CssParameter>
                    </Fill>
                    <Stroke>
                      <CssParameter name="stroke">#0000ff</CssParameter>
                      <CssParameter name="stroke-width">1</CssParameter>
                    </Stroke>
                  </Mark>
                  <Size>10</Size>
                </Graphic>
              </GraphicStroke>
            </Stroke>
          </LineSymbolizer>

...produces this:
WKT shapes may be pooled in properties files (this file must be packed in the same JAR of this module) and re-used across SLD files, becoming libraries of symbols. For instance the WKT marks defined in this properties files (wkt.properties):

...

...may be used in your SLD, prefixed like this (not the protocol changed to "wktlib://"):

<WellKnownName>wktlib://wkt.properties#ls</WellKnownName>

Weather symbols

The weather symbols, which are create using Java code, should be prefixed by the "extshape://" protocol in the SLD,  are, for the time being, limited to the following:

 <WellKnownName>extshape://triangle</WellKnownName>
 <WellKnownName>extshape://emicircle</WellKnownName>

 <WellKnownName>extshape://triangleemicircle</WellKnownName>

Module Status

There is no interesting development planned at this time.

...