Package org.geotools.api.style
Interface ColorMap
- All Known Implementing Classes:
ColorMapImpl
public interface ColorMap
The ColorMap element defines the mapping of palette-type raster colors or fixed- numeric pixel values to colors using
an Interpolate or Categorize SE function
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.
- Since:
- GeoAPI 2.2
- Author:
- Open Geospatial Consortium, Johann Sorel (Geomatys)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(StyleVisitor visitor) accept
(TraversingStyleVisitor visitor, Object extraData) calls the visit method of a StyleVisitorvoid
addColorMapEntry
(ColorMapEntry entry) getColorMapEntry
(int i) boolean
int
getType()
Type of color map; matchinges the function returned by getFunction().getName()void
setExtendedColors
(boolean extended) Tells me to use 65536 colors even if 256 could suffice.void
setType
(int type)
-
Field Details
-
TYPE_RAMP
static final int TYPE_RAMP- See Also:
-
TYPE_INTERVALS
static final int TYPE_INTERVALS- See Also:
-
TYPE_VALUES
static final int TYPE_VALUES- See Also:
-
-
Method Details
-
getFunction
Function getFunction()- Returns:
- Interpolate or Categorize function
-
accept
calls the visit method of a StyleVisitor- Parameters:
visitor
- the style visitor
-
addColorMapEntry
-
getColorMapEntries
ColorMapEntry[] getColorMapEntries() -
getColorMapEntry
-
getType
int getType()Type of color map; matchinges the function returned by getFunction().getName()- Returns:
- One of TYPE_RAMP, TYPE_INTERVALS, or TYPE_VALUE
-
setType
void setType(int type) - Parameters:
type
- One of TYPE_RAMP, TYPE_INTERVALS, or TYPE_VALUE
-
accept
-
setExtendedColors
void setExtendedColors(boolean extended) Tells me to use 65536 colors even if 256 could suffice.- Parameters:
extended
-true
for using 65536 colors,false
for using 256.
-
getExtendedColors
boolean getExtendedColors()
-