public class SlopeGenerator extends java.lang.Object implements OMGridGenerator
Modifier and Type | Field and Description |
---|---|
protected ElevationColors |
colors |
protected int |
contrast |
protected boolean |
incomplete |
Constructor and Description |
---|
SlopeGenerator() |
SlopeGenerator(ElevationColors elevColors) |
Modifier and Type | Method and Description |
---|---|
OMGraphic |
generate(OMGrid grid,
Projection proj)
Called from the OMGrid.generate() method to tell the generator
to create something to represent the grid contents.
|
OMRaster |
generateRasterForProjection(OMGrid grid,
Projection proj)
A more defining API method to get what this SlopeGenerator can
create.
|
ElevationColors |
getColors() |
int |
getContrast() |
protected OMRaster |
getRaster(OMGrid grid)
Called from within generate to create an OMRaster object for
the OMGrid.
|
protected double |
getSlopeRun(OMGrid grid,
int contrastAdj)
Method to calculate the run part of the slope (rise over run,
right?).
|
boolean |
isIncompleteImage()
A method to check if the last image created was a complete one.
|
boolean |
needGenerateToRender() |
void |
setColors(ElevationColors elevColors) |
void |
setContrast(int val) |
protected int contrast
protected ElevationColors colors
protected boolean incomplete
public SlopeGenerator()
public SlopeGenerator(ElevationColors elevColors)
public void setColors(ElevationColors elevColors)
public ElevationColors getColors()
public void setContrast(int val)
public int getContrast()
protected OMRaster getRaster(OMGrid grid)
public boolean isIncompleteImage()
public OMRaster generateRasterForProjection(OMGrid grid, Projection proj)
grid
- proj
- public OMGraphic generate(OMGrid grid, Projection proj)
generate
in interface OMGridGenerator
public boolean needGenerateToRender()
needGenerateToRender
in interface OMGridGenerator
protected double getSlopeRun(OMGrid grid, int contrastAdj)
grid
- the OMGrid that contains the data, need to get
units.contrastAdj
- contrast adjustment from 1-10, 5 being no
adjustment. 10 is high contrast, 1 is low contrast.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details