com.bbn.openmap.omGraphics.grid
Class ContourLineGenerator
java.lang.Object
|
+--com.bbn.openmap.omGraphics.grid.SimpleColorGenerator
|
+--com.bbn.openmap.omGraphics.grid.ElevationMBandGenerator
|
+--com.bbn.openmap.omGraphics.grid.ContourLineGenerator
- All Implemented Interfaces:
- OMGridGenerator
- public class ContourLineGenerator
- extends ElevationMBandGenerator
The SimpleColorGenerator is an OMGridGenerator that creates an
OMRaster out of OMGrid data.
Field Summary |
protected int |
backColor
The color to use for the background. |
protected int |
lineColor
The color to use for the contour lines. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lineColor
protected int lineColor
- The color to use for the contour lines.
backColor
protected int backColor
- The color to use for the background.
ContourLineGenerator
public ContourLineGenerator()
generate
public OMGraphic generate(OMGrid grid,
Projection proj)
- Going to return an OMRaster.
- Specified by:
generate
in interface OMGridGenerator
- Overrides:
generate
in class SimpleColorGenerator
- Parameters:
grid
- the grid to create a raster for.proj
- description of the map.
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 ElevationMBandGenerator
- Parameters:
source
- a grid point value assigned to the raster pixel.
- Returns:
- the ARGB to color the pixel.
checkData
protected int checkData(int[][] pastValues,
int x,
int y)
needGenerateToRender
public boolean needGenerateToRender()
- We at least need one generate for XY and OFFSET grids. We will
need a generate every time the projection changes for LATLON
rendertype grids. So return true for everything.
- Specified by:
needGenerateToRender
in interface OMGridGenerator
- Overrides:
needGenerateToRender
in class SimpleColorGenerator
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details