001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
005: * (C) 2002, Centre for Computational Geography
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation;
010: * version 2.1 of the License.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * Contacts:
018: * UNITED KINGDOM: James Macgill. j.macgill@geog.leeds.ac.uk
019: */
020: package org.geotools.styling;
021:
022: /**
023: * A symbolizer describes how a feature should appear on a map.
024: *
025: * <p>
026: * The symbolizer describes not just the shape that should appear but also
027: * such graphical properties as color and opacity.
028: * </p>
029: *
030: * <p>
031: * A symbolizer is obtained by specifying one of a small number of different
032: * types of symbolizer and then supplying parameters to override its default
033: * behaviour.
034: * </p>
035: *
036: * <p>
037: * The details of this object are taken from the <a
038: * href="https://portal.opengeospatial.org/files/?artifact_id=1188"> OGC
039: * Styled-Layer Descriptor Report (OGC 02-070) version 1.0.0.</a>:
040: * <pre><code>
041: * <xsd:element name="LineSymbolizer" substitutionGroup="sld:Symbolizer">
042: * <xsd:annotation>
043: * <xsd:documentation>
044: * A LineSymbolizer is used to render a "stroke" along a linear geometry.
045: * </xsd:documentation>
046: * </xsd:annotation>
047: * <xsd:complexType>
048: * <xsd:complexContent>
049: * <xsd:extension base="sld:SymbolizerType">
050: * <xsd:sequence>
051: * <xsd:element ref="sld:Geometry" minOccurs="0"/>
052: * <xsd:element ref="sld:Stroke" minOccurs="0"/>
053: * </xsd:sequence>
054: * </xsd:extension>
055: * </xsd:complexContent>
056: * </xsd:complexType>
057: * </xsd:element>
058: * </code></pre>
059: * </p>
060: *
061: * <p>
062: * Renderers can use this information when displaying styled features, though
063: * it must be remembered that not all renderers will be able to fully
064: * represent strokes as set out by this interface. For example, opacity may
065: * not be supported.
066: * </p>
067: *
068: * <p>
069: * Notes:
070: *
071: * <ul>
072: * <li>
073: * The graphical parameters and their values are derived from SVG/CSS2
074: * standards with names and semantics which are as close as possible.
075: * </li>
076: * </ul>
077: * </p>
078: *
079: * @author James Macgill, CCG
080: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/styling/LineSymbolizer.java $
081: * @version $Id: LineSymbolizer.java 20562 2006-07-16 14:54:53Z jgarnett $
082: */
083: public interface LineSymbolizer extends Symbolizer {
084: /**
085: * Provides the graphical-symbolization parameter to use for the linear
086: * geometry.
087: *
088: * @return The Stroke style to use when rendering lines.
089: */
090: Stroke getStroke();
091:
092: /**
093: * Provides the graphical-symbolization parameter to use for the linear
094: * geometry.
095: *
096: * @param stroke The Stroke style to use when rendering lines.
097: */
098: void setStroke(Stroke stroke);
099:
100: /**
101: * This property defines the geometry to be used for styling.<br>
102: * The property is optional and if it is absent (null) then the "default"
103: * geometry property of the feature should be used. Geometry types other
104: * than inherently linear types can be used. If a point geometry is used,
105: * it should be interpreted as a line of zero length and two end caps. If
106: * a polygon is used (or other "area" type) then its closed outline should
107: * be used as the line string (with no end caps). The geometryPropertyName
108: * is the name of a geometry property in the Feature being styled.
109: * Typically, features only have one geometry so, in general, the need to
110: * select one is not required. Note: this moves a little away from the SLD
111: * spec which provides an XPath reference to a Geometry object, but does
112: * follow it in spirit.
113: *
114: * @return The name of the attribute in the feature being styled that
115: * should be used. If null then the default geometry should be
116: * used.
117: */
118: String getGeometryPropertyName();
119:
120: void setGeometryPropertyName(String geometryPropertyName);
121: }
|