Java Doc for RasterSymbolizer.java in  » GIS » GeoTools-2.4.1 » org » geotools » styling » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.styling 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.styling.RasterSymbolizer

All known Subclasses:   org.geotools.styling.RasterSymbolizerImpl,
RasterSymbolizer
public interface RasterSymbolizer extends Symbolizer(Code)
The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos, DEMs).

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


 <xs:element name="RasterSymbolizer">
 <xs:complexType>
 <xs:sequence>
 <xs:element ref="sld:Geometry" minOccurs="0"/>
 <xs:element ref="sld:Opacity" minOccurs="0"/>
 <xs:element ref="sld:ChannelSelection" minOccurs="0"/>
 <xs:element ref="sld:OverlapBehavior" minOccurs="0"/>
 <xs:element ref="sld:ColorMap" minOccurs="0"/>
 <xs:element ref="sld:ContrastEnhancement" minOccurs="0"/>
 <xs:element ref="sld:ShadedRelief" minOccurs="0"/>
 <xs:element ref="sld:ImageOutline" minOccurs="0"/>
 </xs:sequence>
 </xs:complexType>
 </xs:element>
 
The following example applies a coloring to elevation (DEM) data (quantities are in meters):
 <RasterSymbolizer>
 <Opacity>1.0</Opacity>
 <ColorMap>
 <ColorMapEntry color="#00ff00" quantity="-500"/>
 <ColorMapEntry color="#00fa00" quantity="-417"/>
 <ColorMapEntry color="#14f500" quantity="-333"/>
 <ColorMapEntry color="#28f502" quantity="-250"/>
 <ColorMapEntry color="#3cf505" quantity="-167"/>
 <ColorMapEntry color="#50f50a" quantity="-83"/>
 <ColorMapEntry color="#64f014" quantity="-1"/>
 <ColorMapEntry color="#7deb32" quantity="0"/>
 <ColorMapEntry color="#78c818" quantity="30"/>
 <ColorMapEntry color="#38840c" quantity="105"/>
 <ColorMapEntry color="#2c4b04" quantity="300"/>
 <ColorMapEntry color="#ffff00" quantity="400"/>
 <ColorMapEntry color="#dcdc00" quantity="700"/>
 <ColorMapEntry color="#b47800" quantity="1200"/>
 <ColorMapEntry color="#c85000" quantity="1400"/>
 <ColorMapEntry color="#be4100" quantity="1600"/>
 <ColorMapEntry color="#963000" quantity="2000"/>
 <ColorMapEntry color="#3c0200" quantity="3000"/>
 <ColorMapEntry color="#ffffff" quantity="5000"/>
 <ColorMapEntry color="#ffffff" quantity="13000"/>
 </ColorMap>
 <OverlapBehavior>
 <AVERAGE/>
 </OverlapBehavior>
 <ShadedRelief/>
 </RasterSymbolizer>
 
Here is a rather artificial mutli-band raster symbol:
 <RasterSymbolizer>
 <Opacity>1.0</Opacity>
 <ColorMap>
 <ColorMapEntry color="#000000" quantity="0"/>
 <ColorMapEntry color="#ffffff" quantity="255"/>
 </ColorMap>
 <ChannelSelection>
 <RedChannel>
 <SourceChannelName>1</SourceChannelName>
 <ContrastEnhancement>
 <Histogram/>
 </ContrastEnhancement>
 </RedChannel>
 <GreenChannel>
 <SourceChannelName>2</SourceChannelName>
 <ContrastEnhancement>
 <GammaValue>2.5</GammaValue>
 </ContrastEnhancement>
 </GreenChannel>
 <BlueChannel>
 <SourceChannelName>3</SourceChannelName>
 <ContrastEnhancement>
 <Normalize/>
 </ContrastEnhancement>
 </BlueChannel>
 </ChannelSelection>
 <OverlapBehavior>
 <LATEST_ON_TOP/>
 </OverlapBehavior>
 <ContrastEnhancement>
 <GammaValue>1.0</GammaValue>
 </ContrastEnhancement>
 </RasterSymbolizer>
 
$Id: RasterSymbolizer.java 25459 2007-05-08 05:19:25Z jgarnett $


author:
   Ian Turton, CCG




Method Summary
 ChannelSelectiongetChannelSelection()
     The ChannelSelection element specifies the false-color channel selection for a multi-spectral raster source (such as a multi-band satellite-imagery source).
 ColorMapgetColorMap()
     The ColorMap element defines either the colors of a palette-type raster source or the mapping of fixed-numeric pixel values to colors.
 ContrastEnhancementgetContrastEnhancement()
     The ContrastEnhancement element defines contrast enhancement for a channel of a false-color image or for a color image.
 StringgetGeometryPropertyName()
     The interpretation of Geometry is system-dependent, as raster data may be organized differently from feature data, though omitting this element selects the default raster-data source.
 SymbolizergetImageOutline()
     The ImageOutline element specifies that individual source rasters in a multi-raster set (such as a set of satellite-image scenes) should be outlined with either a LineStringSymbol or PolygonSymbol.
 ExpressiongetOpacity()
    
 ExpressiongetOverlap()
     The OverlapBehavior element tells a system how to behave when multiple raster images in a layer overlap each other, for example with satellite-image scenes.
 ShadedReliefgetShadedRelief()
     The ShadedRelief element selects the application of relief shading (or ?hill shading?) to an image for a three-dimensional visual effect.
 voidsetChannelSelection(ChannelSelection channel)
     The ChannelSelection element specifies the false-color channel selection for a multi-spectral raster source (such as a multi-band satellite-imagery source).
 voidsetColorMap(ColorMap colorMap)
     The ColorMap element defines either the colors of a palette-type raster source or the mapping of fixed-numeric pixel values to colors.
 voidsetContrastEnhancement(ContrastEnhancement ce)
     The ContrastEnhancement element defines contrast enhancement for a channel of a false-color image or for a color image.
 voidsetGeometryPropertyName(String geometryPropertyName)
     The interpretation of Geometry is system-dependent, as raster data may be organized differently from feature data, though omitting this element selects the default raster-data source.
 voidsetImageOutline(Symbolizer symbolizer)
     The ImageOutline element specifies that individual source rasters in a multi-raster set (such as a set of satellite-image scenes) should be outlined with either a LineStringSymbol or PolygonSymbol.
 voidsetOpacity(Expression opacity)
     sets the opacity for the coverage, it has the usual meaning.
 voidsetOverlap(Expression overlap)
     The OverlapBehavior element tells a system how to behave when multiple raster images in a layer overlap each other, for example with satellite-image scenes.
 voidsetShadedRelief(ShadedRelief relief)
     The ShadedRelief element selects the application of relief shading (or ?hill shading?) to an image for a three-dimensional visual effect.



Method Detail
getChannelSelection
ChannelSelection getChannelSelection()(Code)
The ChannelSelection element specifies the false-color channel selection for a multi-spectral raster source (such as a multi-band satellite-imagery source). Either a channel may be selected to display in each of red, green, and blue, or a single channel may be selected to display in grayscale. (The spelling ?gray? is used since it seems to be more common on the Web than ?grey? by a ratio of about 3:1.) Contrast enhancement may be applied to each channel in isolation. Channels are identified by a system and data-dependent character identifier. Commonly, channels will be labelled as ?1?, ?2?, etc. the ChannelSelection object set or null if none is available.



getColorMap
ColorMap getColorMap()(Code)
The ColorMap element defines either the colors of a palette-type raster source or the mapping of fixed-numeric pixel values to colors. For example, a DEM raster giving elevations in meters above sea level can be translated to a colored image with a ColorMap. The quantity attributes of a color-map are used for translating between numeric matrixes and color rasters and the ColorMap entries should be in order of increasing numeric quantity so that intermediate numeric values can be matched to a color (or be interpolated between two colors). Labels may be used for legends or may be used in the future to match character values. Not all systems can support opacity in colormaps. The default opacity is 1.0 (fully opaque). Defaults for quantity and label are system-dependent. the ColorMap for the raster



getContrastEnhancement
ContrastEnhancement getContrastEnhancement()(Code)
The ContrastEnhancement element defines contrast enhancement for a channel of a false-color image or for a color image. In the case of a color image, the relative grayscale brightness of a pixel color is used. ?Normalize? means to stretch the contrast so that the dimmest color is stretched to black and the brightest color is stretched to white, with all colors in between stretched out linearly. ?Histogram? means to stretch the contrast based on a histogram of how many colors are at each brightness level on input, with the goal of producing equal number of pixels in the image at each brightness level on output. This has the effect of revealing many subtle ground features. A ?GammaValue? tells how much to brighten (value greater than 1.0) or dim (value less than 1.0) an image. The default GammaValue is 1.0 (no change). If none of Normalize, Histogram, or GammaValue are selected in a ContrastEnhancement, then no enhancement is performed. the ContrastEnhancement



getGeometryPropertyName
String getGeometryPropertyName()(Code)
The interpretation of Geometry is system-dependent, as raster data may be organized differently from feature data, though omitting this element selects the default raster-data source. Geometry-type transformations are also system-dependent and it is assumed that this capability will be little used. the name of the geometry



getImageOutline
Symbolizer getImageOutline()(Code)
The ImageOutline element specifies that individual source rasters in a multi-raster set (such as a set of satellite-image scenes) should be outlined with either a LineStringSymbol or PolygonSymbol. It is defined as:
 <xs:element name="ImageOutline">
 <xs:complexType>
 <xs:choice>
 <xs:element ref="sld:LineSymbolizer"/>
 <xs:element ref="sld:PolygonSymbolizer"/>
 </xs:choice>
 </xs:complexType>
 </xs:element>
 
An Opacity of 0.0 can be selected for the main raster to avoid rendering the main-raster pixels, or an opacity can be used for a PolygonSymbolizer Fill to allow the main-raster data be visible through the fill. The relevent symbolizer



getOpacity
Expression getOpacity()(Code)
fetch the expresion which evaluates to the opacity fo rthis coverage The expression



getOverlap
Expression getOverlap()(Code)
The OverlapBehavior element tells a system how to behave when multiple raster images in a layer overlap each other, for example with satellite-image scenes. LATEST_ON_TOP and EARLIEST_ON_TOP refer to the time the scene was captured. AVERAGE means to average multiple scenes together. This can produce blurry results if the source images are not perfectly aligned in their geo-referencing. RANDOM means to select an image (or piece thereof) randomly and place it on top. This can produce crisper results than AVERAGE potentially more efficiently than LATEST_ON_TOP or EARLIEST_ON_TOP. The default behaviour is system-dependent. The expression which evaluates to LATEST_ON_TOP,EARLIEST_ON_TOP, AVERAGE or RANDOM



getShadedRelief
ShadedRelief getShadedRelief()(Code)
The ShadedRelief element selects the application of relief shading (or ?hill shading?) to an image for a three-dimensional visual effect. It is defined as: Exact parameters of the shading are system-dependent (for now). If the BrightnessOnly flag is ?0? (false, default), the shading is applied to the layer being rendered as the current RasterSymbol. If BrightnessOnly is ?1? (true), the shading is applied to the brightness of the colors in the rendering canvas generated so far by other layers, with the effect of relief-shading these other layers. The default for BrightnessOnly is ?0? (false). The ReliefFactor gives the amount of exaggeration to use for the height of the ?hills.? A value of around 55 (times) gives reasonable results for Earth-based DEMs. The default value is system-dependent. the shadedrelief object



setChannelSelection
void setChannelSelection(ChannelSelection channel)(Code)
The ChannelSelection element specifies the false-color channel selection for a multi-spectral raster source (such as a multi-band satellite-imagery source). Either a channel may be selected to display in each of red, green, and blue, or a single channel may be selected to display in grayscale. (The spelling ?gray? is used since it seems to be more common on the Web than ?grey? by a ratio of about 3:1.) Contrast enhancement may be applied to each channel in isolation. Channels are identified by a system and data-dependent character identifier. Commonly, channels will be labelled as ?1?, ?2?, etc.
Parameters:
  channel - the channel selected



setColorMap
void setColorMap(ColorMap colorMap)(Code)
The ColorMap element defines either the colors of a palette-type raster source or the mapping of fixed-numeric pixel values to colors. For example, a DEM raster giving elevations in meters above sea level can be translated to a colored image with a ColorMap. The quantity attributes of a color-map are used for translating between numeric matrixes and color rasters and the ColorMap entries should be in order of increasing numeric quantity so that intermediate numeric values can be matched to a color (or be interpolated between two colors). Labels may be used for legends or may be used in the future to match character values. Not all systems can support opacity in colormaps. The default opacity is 1.0 (fully opaque). Defaults for quantity and label are system-dependent.
Parameters:
  colorMap - the ColorMap for the raster



setContrastEnhancement
void setContrastEnhancement(ContrastEnhancement ce)(Code)
The ContrastEnhancement element defines contrast enhancement for a channel of a false-color image or for a color image. In the case of a color image, the relative grayscale brightness of a pixel color is used. ?Normalize? means to stretch the contrast so that the dimmest color is stretched to black and the brightest color is stretched to white, with all colors in between stretched out linearly. ?Histogram? means to stretch the contrast based on a histogram of how many colors are at each brightness level on input, with the goal of producing equal number of pixels in the image at each brightness level on output. This has the effect of revealing many subtle ground features. A ?GammaValue? tells how much to brighten (value greater than 1.0) or dim (value less than 1.0) an image. The default GammaValue is 1.0 (no change). If none of Normalize, Histogram, or GammaValue are selected in a ContrastEnhancement, then no enhancement is performed.
Parameters:
  ce - the contrastEnhancement



setGeometryPropertyName
void setGeometryPropertyName(String geometryPropertyName)(Code)
The interpretation of Geometry is system-dependent, as raster data may be organized differently from feature data, though omitting this element selects the default raster-data source. Geometry-type transformations are also system-dependent and it is assumed that this capability will be little used.
Parameters:
  geometryPropertyName - the name of the Geometry



setImageOutline
void setImageOutline(Symbolizer symbolizer)(Code)
The ImageOutline element specifies that individual source rasters in a multi-raster set (such as a set of satellite-image scenes) should be outlined with either a LineStringSymbol or PolygonSymbol. It is defined as:
 <xs:element name="ImageOutline">
 <xs:complexType>
 <xs:choice>
 <xs:element ref="sld:LineSymbolizer"/>
 <xs:element ref="sld:PolygonSymbolizer"/>
 </xs:choice>
 </xs:complexType>
 </xs:element>
 
An Opacity of 0.0 can be selected for the main raster to avoid rendering the main-raster pixels, or an opacity can be used for a PolygonSymbolizer Fill to allow the main-raster data be visible through the fill.
Parameters:
  symbolizer - the symbolizer to be used. If this is not apolygon or a line symbolizer an unexpected argument exceptionmay be thrown by an implementing class.



setOpacity
void setOpacity(Expression opacity)(Code)
sets the opacity for the coverage, it has the usual meaning.
Parameters:
  opacity - An expression which evaluates to the the opacity (0-1)



setOverlap
void setOverlap(Expression overlap)(Code)
The OverlapBehavior element tells a system how to behave when multiple raster images in a layer overlap each other, for example with satellite-image scenes. LATEST_ON_TOP and EARLIEST_ON_TOP refer to the time the scene was captured. AVERAGE means to average multiple scenes together. This can produce blurry results if the source images are not perfectly aligned in their geo-referencing. RANDOM means to select an image (or piece thereof) randomly and place it on top. This can produce crisper results than AVERAGE potentially more efficiently than LATEST_ON_TOP or EARLIEST_ON_TOP. The default behaviour is system-dependent.
Parameters:
  overlap - the expression which evaluates to LATEST_ON_TOP,EARLIEST_ON_TOP, AVERAGE or RANDOM



setShadedRelief
void setShadedRelief(ShadedRelief relief)(Code)
The ShadedRelief element selects the application of relief shading (or ?hill shading?) to an image for a three-dimensional visual effect. It is defined as: Exact parameters of the shading are system-dependent (for now). If the BrightnessOnly flag is ?0? (false, default), the shading is applied to the layer being rendered as the current RasterSymbol. If BrightnessOnly is ?1? (true), the shading is applied to the brightness of the colors in the rendering canvas generated so far by other layers, with the effect of relief-shading these other layers. The default for BrightnessOnly is ?0? (false). The ReliefFactor gives the amount of exaggeration to use for the height of the ?hills.? A value of around 55 (times) gives reasonable results for Earth-based DEMs. The default value is system-dependent.
Parameters:
  relief - the shadedrelief object



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.