com.bbn.openmap.dataAccess.dted
Class DTEDSlopeGenerator

java.lang.Object
  extended by com.bbn.openmap.omGraphics.grid.SlopeGenerator
      extended by com.bbn.openmap.dataAccess.dted.DTEDSlopeGenerator
All Implemented Interfaces:
OMGridGenerator

public class DTEDSlopeGenerator
extends SlopeGenerator

The DTEDSlopeGenerator is an extension to the SlopeGenerator that uses OMScalingRasters for images created from the DTED data. It caches the image and will reuse it if the projection parameters allow it. It's needed because it assumes that the OMGrid used is a OMDTEDGrid, which has the lat/lons of the lower left and upper right corners of the DTED frame.


Field Summary
protected  float generatedScale
          The scale at which the cached raster was generated.
protected  OMRaster raster
          The cached OMScalingRaster, which can be reused instead of regenerated in some projection circumstances.
 
Fields inherited from class com.bbn.openmap.omGraphics.grid.SlopeGenerator
colors, contrast, incomplete
 
Constructor Summary
DTEDSlopeGenerator()
           
DTEDSlopeGenerator(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.
protected  OMRaster getRaster(OMGrid grid)
          Called from within generate to create an OMRaster object for the OMGrid.
 
Methods inherited from class com.bbn.openmap.omGraphics.grid.SlopeGenerator
generateRasterForProjection, getColors, getContrast, getSlopeRun, isIncompleteImage, needGenerateToRender, setColors, setContrast
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

raster

protected OMRaster raster
The cached OMScalingRaster, which can be reused instead of regenerated in some projection circumstances.


generatedScale

protected float generatedScale
The scale at which the cached raster was generated.

Constructor Detail

DTEDSlopeGenerator

public DTEDSlopeGenerator()

DTEDSlopeGenerator

public DTEDSlopeGenerator(ElevationColors elevColors)
Method Detail

getRaster

protected OMRaster getRaster(OMGrid grid)
Called from within generate to create an OMRaster object for the OMGrid. This method exists to make it easier to extend this class to create an OMRaster as needed.

Overrides:
getRaster in class SlopeGenerator

generate

public OMGraphic generate(OMGrid grid,
                          Projection proj)
Called from the OMGrid.generate() method to tell the generator to create something to represent the grid contents.

Specified by:
generate in interface OMGridGenerator
Overrides:
generate in class SlopeGenerator


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details