|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bbn.openmap.omGraphics.grid.SlopeGenerator
public class SlopeGenerator
The SlopeGenerator is an OMGridGenerator that looks at elevation data and creates shading images from it. It currently works for short data only, since that what DTED elevation data is. Making it work with different data types is on the to-do list.
Field Summary | |
---|---|
protected ElevationColors |
colors
|
protected int |
contrast
|
protected boolean |
incomplete
|
Constructor Summary | |
---|---|
SlopeGenerator()
|
|
SlopeGenerator(ElevationColors elevColors)
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int contrast
protected ElevationColors colors
protected boolean incomplete
Constructor Detail |
---|
public SlopeGenerator()
public SlopeGenerator(ElevationColors elevColors)
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |