001    /*
002     *    GeoAPI - Java interfaces for OGC/ISO standards
003     *    http://www.geoapi.org
004     *
005     *    Copyright (C) 2008-2012 Open Geospatial Consortium, Inc.
006     *    All Rights Reserved. http://www.opengeospatial.org/ogc/legal
007     *
008     *    Permission to use, copy, and modify this software and its documentation, with
009     *    or without modification, for any purpose and without fee or royalty is hereby
010     *    granted, provided that you include the following on ALL copies of the software
011     *    and documentation or portions thereof, including modifications, that you make:
012     *
013     *    1. The full text of this NOTICE in a location viewable to users of the
014     *       redistributed or derivative work.
015     *    2. Notice of any changes or modifications to the OGC files, including the
016     *       date changes were made.
017     *
018     *    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
019     *    NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
020     *    TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
021     *    THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
022     *    PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
023     *
024     *    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
025     *    CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
026     *
027     *    The name and trademarks of copyright holders may NOT be used in advertising or
028     *    publicity pertaining to the software without specific, written prior permission.
029     *    Title to copyright in this software and any associated documentation will at all
030     *    times remain with copyright holders.
031     */
032    package org.opengis.style;
033    
034    import org.opengis.annotation.Extension;
035    import org.opengis.annotation.XmlElement;
036    import org.opengis.filter.expression.Expression;
037    
038    
039    /**
040     * The RasterSymbolizer describes how to render raster/matrix-coverage data
041     * (e.g., satellite photos, DEMs).
042     *
043     * @version <A HREF="http://www.opengeospatial.org/standards/symbol">Symbology Encoding Implementation Specification 1.1.0</A>
044     * @author Open Geospatial Consortium
045     * @author Ian Turton, CCG
046     * @author Johann Sorel (Geomatys)
047     * @since GeoAPI 2.2
048     */
049    @XmlElement("RasterSymbolizer")
050    public interface RasterSymbolizer extends Symbolizer {
051    
052        /**
053         * Indicates the level of translucency as a floating point number whose value is between 0.0
054         * and 1.0 (inclusive).  A value of zero means completely transparent.  A value of 1.0 means
055         * completely opaque.  If null, the default value is 1.0, totally opaque.
056         * @return expression
057         */
058        @XmlElement("Opacity")
059        Expression getOpacity();
060    
061        /**
062         * The ChannelSelection element specifies the false-color channel selection
063         * for a multi-spectral raster source (such as a multi-band
064         * satellite-imagery source). Either a channel may be selected to display
065         * in each of red, green, and blue, or a single channel may be selected to
066         * display in grayscale.  (The spelling ?gray? is used since it seems to
067         * be more common on the Web than ?grey? by a ratio of about 3:1.)
068         * Contrast enhancement may be applied to each channel in isolation.
069         * Channels are identified by a system and data-dependent character
070         * identifier.  Commonly, channels will be labelled as ?1?, ?2?, etc.
071         *
072         * @return the ChannelSelection object set or null if none is available.
073         */
074        @XmlElement("ChannelSelection")
075        ChannelSelection getChannelSelection();
076    
077        /**
078         * The OverlapBehavior element tells a system how to behave when multiple
079         * raster images in a layer  overlap each other, for example with
080         * satellite-image scenes. LATEST_ON_TOP and EARLIEST_ON_TOP refer to the
081         * time the scene was captured.   AVERAGE means to average multiple scenes
082         * together.   This can produce blurry results if the source images are
083         * not perfectly aligned in their geo-referencing. RANDOM means to select
084         * an image (or piece thereof) randomly and place it on top.  This can
085         * produce crisper  results than AVERAGE potentially more efficiently than
086         * LATEST_ON_TOP or EARLIEST_ON_TOP.   The default behaviour is
087         * system-dependent.
088         *
089         * @return LATEST_ON_TOP,EARLIEST_ON_TOP, AVERAGE or RANDOM
090         */
091        @XmlElement("OverlapBehavior")
092        OverlapBehavior getOverlapBehavior();
093    
094        /**
095         * The ColorMap element defines either the colors of a palette-type raster
096         * source or the mapping of  fixed-numeric pixel values to colors.  For
097         * example, a DEM raster giving elevations in meters above sea level can
098         * be translated to a colored  image with a ColorMap.  The quantity
099         * attributes of a color-map are used for translating between numeric
100         * matrixes and color rasters and the ColorMap entries should be in order
101         * of increasing numeric quantity so  that intermediate numeric values can
102         * be matched to a color (or be interpolated between two colors).   Labels
103         * may be used for legends or may be used in the future to match character
104         * values.   Not all systems can support opacity in colormaps.  The
105         * default opacity is 1.0 (fully opaque).   Defaults for quantity and
106         * label are system-dependent.
107         *
108         * @return the ColorMap for the raster
109         */
110        @XmlElement("ColorMap")
111        ColorMap getColorMap();
112    
113        /**
114         * The ContrastEnhancement element defines contrast enhancement for a
115         * channel of a false-color image or  for a color image. In the case of a
116         * color image, the relative grayscale brightness of a pixel color is
117         * used.  ?Normalize? means to stretch the contrast so that the dimmest
118         * color is stretched to black and  the brightest color is stretched to
119         * white, with all colors in between stretched out linearly.   ?Histogram?
120         * means to stretch the contrast based on a histogram of how many colors
121         * are at  each brightness level on input, with the goal of producing
122         * equal number of pixels in the image at each brightness level on output.
123         * This has the effect of revealing many subtle ground features.   A
124         * ?GammaValue? tells how much to brighten (value greater than 1.0) or dim
125         * (value less than 1.0) an image. The default GammaValue is 1.0 (no
126         * change). If none of Normalize, Histogram, or GammaValue are selected in
127         * a ContrastEnhancement, then no enhancement is performed.
128         *
129         * @return the ContrastEnhancement
130         */
131        @XmlElement("ContrastEnhancement")
132        ContrastEnhancement getContrastEnhancement();
133    
134        /**
135         * The ShadedRelief element selects the application of relief shading (or
136         * ?hill shading?) to an image for  a three-dimensional visual effect.  It
137         * is defined as: Exact parameters of the shading are system-dependent
138         * (for now).  If the BrightnessOnly flag is ?0?  (false, default), the
139         * shading is applied to the layer being rendered as the current
140         * RasterSymbol. If BrightnessOnly is ?1? (true), the shading is applied
141         * to the brightness of the colors in the rendering canvas generated so
142         * far by other layers, with the effect of relief-shading these other
143         * layers. The default for BrightnessOnly is ?0? (false).  The
144         * ReliefFactor gives the amount of exaggeration to  use for the height of
145         * the ?hills.?  A value of around 55 (times) gives reasonable results for
146         * Earth-based DEMs. The default value is system-dependent.
147         *
148         * @return the shadedrelief object
149         */
150        @XmlElement("ShadedRelief")
151        ShadedRelief getShadedRelief();
152    
153        /**
154         * The ImageOutline element specifies that individual source rasters in a
155         * multi-raster set (such as a  set of satellite-image scenes) should be
156         * outlined with either a LineStringSymbol or PolygonSymbol.
157         *
158         * An Opacity of 0.0 can be selected for the main raster to avoid rendering
159         * the main-raster pixels, or  an opacity can be used for a
160         * PolygonSymbolizer Fill to allow the main-raster data be visible through
161         * the fill.
162         *
163         * @return The relevent symbolizer
164         */
165        @XmlElement("ImageOutline")
166        Symbolizer getImageOutline();
167    
168        /**
169         * calls the visit method of a StyleVisitor
170         *
171         * @param visitor the style visitor
172         */
173        @Extension
174        Object accept(StyleVisitor visitor, Object extraData);
175        
176    }