com.bbn.openmap.omGraphics.grid
Class ElevationBandGenerator
java.lang.Object
com.bbn.openmap.omGraphics.grid.SimpleColorGenerator
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
ElevationBandGenerator
public ElevationBandGenerator()
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