class IntCachedColorMap extends ColorMap
Caches a color ramp based on a histogram of values. This is an optimization, since often times we create a histogram while classifying, and can reuse that computed information in the color mapping.
In order for this class to work correctly the histogram acts as a map from values to their colors and must contain a value for each pixel value that we expect to encounter.
The performance benefit is eC
lookup cost instead of Log
provided by IntColorMap
- Alphabetic
- By Inheritance
- IntCachedColorMap
- ColorMap
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
IntCachedColorMap(colors: Vector[Int], h: histogram.Histogram[Int], options: Options)
- colors
All color values that can be encountered
- h
Histogram where counts of values have been replaced cached RGBA color
Value Members
-
def
breaksString: String
Retrieve a "breaks string" from ColorMap data.
Retrieve a "breaks string" from ColorMap data. The opposite of the ColorMap.fromString methods.
- Definition Classes
- IntCachedColorMap → ColorMap
-
val
colors: Vector[Int]
- Definition Classes
- IntCachedColorMap → ColorMap
-
lazy val
grey: Boolean
- Definition Classes
- ColorMap
-
def
map(z: Int): Int
- Definition Classes
- IntCachedColorMap → ColorMap
-
def
mapColors(f: (Int) ⇒ Int): ColorMap
- Definition Classes
- IntCachedColorMap → ColorMap
-
def
mapColorsToIndex(): ColorMap
Maps each color value to its index in the colors sequence.
Maps each color value to its index in the colors sequence. This is useful for table lookup encodings (ex: geotrellis.raster.render.png.IndexedPngEncoding)
- Definition Classes
- IntCachedColorMap → ColorMap
-
def
mapDouble(z: Double): Int
- Definition Classes
- IntCachedColorMap → ColorMap
- val noDataColor: Int
-
lazy val
opaque: Boolean
- Definition Classes
- ColorMap
-
val
options: Options
- Definition Classes
- IntCachedColorMap → ColorMap
-
def
render(tile: Tile): Tile
- Definition Classes
- ColorMap
-
def
withBoundaryType(classBoundaryType: ClassBoundaryType): ColorMap
- Definition Classes
- IntCachedColorMap → ColorMap
-
def
withFallbackColor(color: Int): ColorMap
- Definition Classes
- IntCachedColorMap → ColorMap
-
def
withNoDataColor(color: Int): ColorMap
- Definition Classes
- IntCachedColorMap → ColorMap