|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.dted.DTEDCacheManager
public class DTEDCacheManager
The DTEDCacheManager is the object you need if you want to retrieve DTED files en masse for display. You set it up with the paths to the files, and then ask it for an OMGraphicList that contains the frames for a geographical area.
The DTEDCacheManager also manages objects called DTEDCacheHandlers. Cache handlers have their own set of frames, figure out which frames are needed to fill the screen, and ask each frame for the rasters (subframes). The situation gets pretty tricky when the screen has the equator and/or the dateline on it, and a different cache handler is needed for each quadrant of the earth. This situation is relatively rare, though, and the DTEDCacheManager automatically checks for these situations and creates the cache handlers needed.
There are two calls to the Cache that you need to use. The constructor sets up the cache with the location of the data on your system. The getRectangle() call returns an OMGraphicList of objects to draw, that cover the area asked for.
Field Summary | |
---|---|
protected DTEDCacheHandler[] |
caches
The cache handlers needed to cover the screen. |
protected int |
cacheSize
|
protected java.lang.String[] |
dtedDirPaths
|
static int |
MAX_NUM_BOXES
A box is a earth quadrant. |
protected int |
numColors
|
protected int |
opaqueness
|
static int |
SMALL_CACHE_SIZE
The size of the smaller caches, when more cachehandlers are needed to cover the equator and the dateline. |
protected DTEDFrameSubframeInfo |
subframeInfo
|
Constructor Summary | |
---|---|
DTEDCacheManager()
Constructor that uses the default paths and the default number of colors. |
|
DTEDCacheManager(java.lang.String[] DTEDPaths)
Constructor that lets you set the paths of the DTED directories, where the data is located. |
|
DTEDCacheManager(java.lang.String[] DTEDPaths,
int num_colors,
int opaque)
Constructor that lets you set the paths of the DTED directories, where the data is located, as well as the number of colors you want used in the graphics. |
Method Summary | |
---|---|
DTEDCacheHandler[] |
getCaches()
The DTEDCacheManager uses four DTEDCacheHandlers to create frame from DTED files. |
int |
getCacheSize()
Get the number of frames that the caches should contain. |
int |
getElevation(float lat,
float lon)
Get an elevation at a point. |
int |
getNumColors()
|
int |
getOpaqueness()
|
OMGraphicList |
getRectangle(Projection proj)
The call to the cache that lets you choose what kind of information is returned. |
DTEDFrameSubframeInfo |
getSubframeInfo()
|
void |
resetCaches()
Reset the DTEDCacheHandler array so the handlers will get created on the next frame request. |
void |
setCacheSize(int size)
Set the number of frames that the caches should contain. |
void |
setDtedDirPaths(java.lang.String[] paths)
Used to set the DTED directory paths. |
void |
setNumColors(int numberOfColors)
|
void |
setOpaqueness(int setting)
|
void |
setSubframeInfo(DTEDFrameSubframeInfo dfsi)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SMALL_CACHE_SIZE
public static final int MAX_NUM_BOXES
protected DTEDCacheHandler[] caches
protected DTEDFrameSubframeInfo subframeInfo
protected java.lang.String[] dtedDirPaths
protected int numColors
protected int opaqueness
protected int cacheSize
Constructor Detail |
---|
public DTEDCacheManager()
public DTEDCacheManager(java.lang.String[] DTEDPaths)
DTEDPaths
- pathnames to the DTED directories.public DTEDCacheManager(java.lang.String[] DTEDPaths, int num_colors, int opaque)
DTEDPaths
- pathnames to the DTED level 0 and 1 directories.num_colors
- number of colors to be used in the graphics.opaque
- the opaqueness of the dted images, 0 - 255 (0 is clear)Method Detail |
---|
public void setDtedDirPaths(java.lang.String[] paths)
paths
- DTED Level 0 and 1 directory paths.public void resetCaches()
public void setCacheSize(int size)
public int getCacheSize()
public int getElevation(float lat, float lon)
lat
- latitude of point in decimal degrees.lon
- longitude of point in decimal degrees.public void setSubframeInfo(DTEDFrameSubframeInfo dfsi)
public DTEDFrameSubframeInfo getSubframeInfo()
public OMGraphicList getRectangle(Projection proj)
proj
- The projection of the screen (CADRG).
public void setNumColors(int numberOfColors)
public int getNumColors()
public void setOpaqueness(int setting)
public int getOpaqueness()
public DTEDCacheHandler[] getCaches()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |