com.bbn.openmap.omGraphics.grid
Class ElevationBandGenerator

java.lang.Object
  extended by com.bbn.openmap.omGraphics.grid.SimpleColorGenerator
      extended by com.bbn.openmap.omGraphics.grid.ElevationBandGenerator
All Implemented Interfaces:
OMGridGenerator

public class ElevationBandGenerator
extends SimpleColorGenerator

The ElevationBandGenerator is an OMGridGenerator that creates an OMRaster out of OMGrid data. The OMgrid data is assumed to be meter elevation points, and the colors given to the pixels in the raster reflect the values as dictated by the Length units. The colortable given to the generator determines the colors used, and the band height sets the elevation range for each color.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.bbn.openmap.omGraphics.grid.SimpleColorGenerator
SimpleColorGenerator.ByteRasterHelper, SimpleColorGenerator.CharRasterHelper, SimpleColorGenerator.DoubleRasterHelper, SimpleColorGenerator.FloatRasterHelper, SimpleColorGenerator.IntRasterHelper, SimpleColorGenerator.RasterHelper, SimpleColorGenerator.ShortRasterHelper
 
Field Summary
protected  int adjust
          A number between 1-5 to adjust the contrast a little between the colors.
protected  int bandHeight
          The elevation difference between the edges of a color - or how much the elevation must change before a pixel gets the next color.
protected  int[] colors
          The colors to use.
protected  Length dataUnits
           
static int DEFAULT_ADJUST
           
static int DEFAULT_BANDHEIGHT
           
protected  Length displayUnits
           
 
Constructor Summary
ElevationBandGenerator()
           
 
Method Summary
 int calibratePointValue(int source)
          Takes the value assigned to a pixel, as determined by it's location in the grid, and gives it a color to be painted by.
 int getAdjust()
           
 int getBandHeight()
           
 int[] getColortable()
           
 Length getDataUnits()
           
 Length getDisplayUnits()
           
 void setAdjust(int value)
           
 void setBandHeight(int height)
           
 void setColors(ElevationColors ec)
           
 void setColortable(int[] colors)
           
 void setDataUnits(Length units)
           
 void setDisplayUnits(Length displayUnits)
           
 
Methods inherited from class com.bbn.openmap.omGraphics.grid.SimpleColorGenerator
createGreyscaleColors, generate, getRasterHelper, needGenerateToRender
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BANDHEIGHT

public static final int DEFAULT_BANDHEIGHT
See Also:
Constant Field Values

DEFAULT_ADJUST

public static final int DEFAULT_ADJUST
See Also:
Constant Field Values

colors

protected int[] colors
The colors to use. The colors[0] is assumed to be the 0 elevation color, and by default, is a light blue color.


adjust

protected int adjust
A number between 1-5 to adjust the contrast a little between the colors.


bandHeight

protected int bandHeight
The elevation difference between the edges of a color - or how much the elevation must change before a pixel gets the next color.


dataUnits

protected Length dataUnits

displayUnits

protected Length displayUnits
Constructor Detail

ElevationBandGenerator

public ElevationBandGenerator()
Method Detail

calibratePointValue

public int calibratePointValue(int source)
Takes the value assigned to a pixel, as determined by it's location in the grid, and gives it a color to be painted by. In this case, the pixel is colored according to the elevation value.

Overrides:
calibratePointValue in class SimpleColorGenerator
Parameters:
source - a grid point value assigned to the raster pixel.
Returns:
the ARGB to color the pixel.

setColortable

public void setColortable(int[] colors)

getColortable

public int[] getColortable()

setColors

public void setColors(ElevationColors ec)

setBandHeight

public void setBandHeight(int height)

getBandHeight

public int getBandHeight()

setAdjust

public void setAdjust(int value)

getAdjust

public int getAdjust()

getDataUnits

public Length getDataUnits()

setDataUnits

public void setDataUnits(Length units)

getDisplayUnits

public Length getDisplayUnits()

setDisplayUnits

public void setDisplayUnits(Length displayUnits)


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details