All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.geotools.styling.Symbolizer Maven / Gradle / Ivy

Go to download

The main module contains the GeoTools public interfaces that are used by other GeoTools modules (and GeoTools applications). Where possible we make use industry standard terms as provided by OGC and ISO standards. The formal GeoTools public api consists of gt-metadata, jts and the gt-main module. The main module contains the default implementations that are available provided to other GeoTools modules using our factory system. Factories are obtained from an appropriate FactoryFinder, giving applications a chance configure the factory used using the Factory Hints facilities. FilterFactory ff = CommonFactoryFinder.getFilterFactory(); Expression expr = ff.add( expression1, expression2 ); If you find yourself using implementation specific classes chances are you doing it wrong: Expression expr = new AddImpl( expression1, expressiom2 );

The newest version!
/*
 *    GeoTools - The Open Source Java GIS Toolkit
 *    http://geotools.org
 *
 *    (C) 2002-2008, Open Source Geospatial Foundation (OSGeo)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 *
 */
package org.geotools.styling;

import java.util.Map;
import javax.measure.Unit;
import javax.measure.quantity.Length;
import org.opengis.filter.expression.Expression;
import org.opengis.filter.expression.PropertyName;

/**
 * This is the parent interface of all Symbolizers.
 *
 * 

A symbolizer describes how a feature should appear on a map. The symbolizer describes not just * the shape that should appear but also such graphical properties as color and opacity. * *

A symbolizer is obtained by specifying one of a small number of different types of symbolizer * and then supplying parameters to overide its default behaviour. * *

The details of this object are taken from the OGC Styled-Layer Descriptor * Report (OGC 02-070) version 1.0.0. * *

Renderers can use this information when displaying styled features, though it must be * remembered that not all renderers will be able to fully represent strokes as set out by this * interface. For example, opacity may not be supported. * *

The graphical parameters and their values are derived from SVG/CSS2 standards with names and * semantics which are as close as possible. * *

* * @author James Macgill, CCG * @version $Id$ */ public interface Symbolizer extends org.opengis.style.Symbolizer { void accept(org.geotools.styling.StyleVisitor visitor); /** * Defines a measure unit for the symbolizer. This parameter is inherited from GML. Renderers * shall use the unit to correctly render symbols. * *

Recommended uom definitions are : * *

* *

    *
  • {@code metre} *
  • {@code foot} *
  • {@code pixel} *
* *

* * @since SymbologyEncoding 1.1 * @param uom can be null, which indicates usage of the pixel unit. */ void setUnitOfMeasure(Unit uom); public Description getDescription(); /** * Tile and Abstract of Symbolzer. * * @since SymbologyEncoding 1.1 */ void setDescription(org.opengis.style.Description description); /** * Name of symbolizer; not always human readable. * *

Please consider getDescription().getTitle() as an alternative if presenting this * symbolizer in a user interface. * * @since SymbologyEncoding 1.1 */ void setName(String name); /** * A shortcut to get the geometry property name in the case the geometry expression is a * PropertyName. In case the geometry expression is null, and in the case the geometry * expression is not a PropertyName, this method will return null. */ String getGeometryPropertyName(); /** * A shortcut to define the geometry expression as a {@link PropertyName} Typically, features * only have one geometry so, in general, the need to select one is not required. Note: this * moves a little away from the SLD spec which provides an XPath reference to a Geometry object, * but does follow it in spirit. */ void setGeometryPropertyName(String geometryPropertyName); /** * This defines the geometry to be used for styling.
* The property is optional and if it is absent (null) then the "default" geometry property of * the feature should be used.
* Typically, features only have one geometry so, in general, the need to select one is not * required.
* The expression can also build a new geometry out of existing attributes or transform an * existing geometry. For geometry transformations that do change the geometry locations or that * make up geometries out of non geometric attributes it is advised that the Expression * implements the SpatialTransformationFunction interface */ Expression getGeometry(); /** Sets the expression used for styling. See {@link #getGeometry()} for further details. */ void setGeometry(Expression geometry); /** Determines if a vendor option with the specific key has been set on this symbolizer. */ boolean hasOption(String key); /** * Map of vendor options for the symbolizer. * *

Client code looking for the existence of a single option should use {@link * #hasOption(String)} */ Map getOptions(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy