com.bbn.openmap.omGraphics.grid
Class ElevationMBandGenerator
java.lang.Object
|
+--com.bbn.openmap.omGraphics.grid.SimpleColorGenerator
|
+--com.bbn.openmap.omGraphics.grid.ElevationMBandGenerator
- All Implemented Interfaces:
- OMGridGenerator
- Direct Known Subclasses:
- ContourLineGenerator, ElevationFBandGenerator
- public class ElevationMBandGenerator
- extends SimpleColorGenerator
The ElevationMBandGenerator 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 meter values. The colortable given to the generator
determines the colors used, and the band height sets the elevation
range for each color.
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. |
static int |
DEFAULT_ADJUST
|
static int |
DEFAULT_BANDHEIGHT
|
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.
ElevationMBandGenerator
public ElevationMBandGenerator()
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()
setBandHeight
public void setBandHeight(int height)
getBandHeight
public int getBandHeight()
setAdjust
public void setAdjust(int value)
getAdjust
public int getAdjust()
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details