|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.layer.dted.DTEDCoverageManager
A DTEDCoverageManager knows how to look at DTED data and figure out what coverage is available. When it is constructed, it needs to know where the data is located, and where it can look for a coverage summary file. If a coverage summary file is not available, it will create one after looking at the data. Using the file is soooo much faster. The coverage manager also takes a URL of a coverage file, but assumes that the file is there. If it isn't, then it falls back on it's behavior of looking for a local summary file, and then to the data itself, to come up with coverage.
Field Summary | |
static java.lang.String |
defaultLevel0ColorString
The default line color for level 0. |
static java.lang.String |
defaultLevel1ColorString
The default line color for level 1. |
static java.lang.String |
defaultLevel2ColorString
The default line color for level 2. |
protected boolean |
fillRects
Flag to fill the coverage rectangles. |
protected java.awt.Paint |
level0Color
The color to outline the shapes for level 0. |
protected boolean[][] |
level0Frames
The array of coverage for level 0 data. |
protected java.awt.Paint |
level1Color
The color to outline the shapes for level 1. |
protected boolean[][] |
level1Frames
The array of coverage for level 1 data. |
protected java.awt.Paint |
level2Color
The color to outline the shapes for level 2. |
protected boolean[][] |
level2Frames
The array of coverage for level 2 data. |
protected int |
opaqueness
A setting for how transparent to make the images. |
protected ProgressSupport |
progressSupport
|
Constructor Summary | |
DTEDCoverageManager(java.lang.String[] paths,
java.lang.String[] paths2,
java.lang.String coverageURL,
java.lang.String coverageFile)
|
Method Summary | |
void |
addProgressListener(ProgressListener list)
Add a ProgressListener that will display build progress. |
void |
checkOutCoverage(java.lang.String[] paths,
java.lang.String[] paths2)
The method that cycles through all the paths, looking for the frames. |
void |
clearProgressListeners()
Clear all progress listeners. |
protected byte[] |
convertBooleansToBytes(boolean[] row)
Convert the booleans to write out to bytes. |
protected boolean[] |
convertBytesToBooleans(byte[] row)
Convert the bytes read in to the file to the booleans used in the coverage arrays. |
protected void |
fireProgressUpdate(int type,
java.lang.String task,
int frameNumber,
int totalFrames)
Fire an build update to progress listeners. |
OMGraphicList[] |
getCoverageRects(int startx,
int starty,
int endx,
int endy,
int LineType)
Method looks at the coverage arrays, and returns the applicable rectangles representing the frame coverages. |
OMGraphicList[] |
getCoverageRects(Projection proj)
Method organizes the query based on the projection, and returns the applicable rectangles representing the frame coverages. |
boolean |
readCoverageFile(java.lang.String coverage)
Read in the coverage file, which is basically three byte[180][360] written out to file. |
protected boolean |
readCoverageFile(java.lang.String urlCov,
java.lang.String coverage)
Read in the coverage file, which is basically three byte[180][360] written out to file. |
void |
removeProgressListener(ProgressListener list)
Remove a ProgressListener that displayed build progress. |
void |
setPaint(java.awt.Paint lev0Color,
java.awt.Paint lev1Color,
java.awt.Paint lev2Color,
int opaque,
boolean fillRectangles)
Set the color arraignment for the rectangles. |
void |
writeCoverageFile(java.lang.String covFilename)
Write the coverage summary to a file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String defaultLevel0ColorString
public static final java.lang.String defaultLevel1ColorString
public static final java.lang.String defaultLevel2ColorString
protected java.awt.Paint level0Color
protected java.awt.Paint level1Color
protected java.awt.Paint level2Color
protected int opaqueness
protected boolean fillRects
protected boolean[][] level0Frames
protected boolean[][] level1Frames
protected boolean[][] level2Frames
protected ProgressSupport progressSupport
Constructor Detail |
public DTEDCoverageManager(java.lang.String[] paths, java.lang.String[] paths2, java.lang.String coverageURL, java.lang.String coverageFile)
Method Detail |
public void setPaint(java.awt.Paint lev0Color, java.awt.Paint lev1Color, java.awt.Paint lev2Color, int opaque, boolean fillRectangles)
lev0Color
- Paint for level 0 frame rectangles.lev1Color
- Paint for level 1 frame rectangles.lev2Color
- Paint for level 2 frame rectangles.opaque
- how transparent the frames should be if they are
filled.fillRectangles
- whether to fill the rectangles with
Paint.public void checkOutCoverage(java.lang.String[] paths, java.lang.String[] paths2)
paths
- paths to the level 0 and 1 dted root directory.paths2
- paths to the level 2 dted root directory.public OMGraphicList[] getCoverageRects(Projection proj)
proj
- the projection of the screen
public OMGraphicList[] getCoverageRects(int startx, int starty, int endx, int endy, int LineType)
startx
- the western-most longitude.starty
- the southern-most latitude.endx
- the eastern-most longitude.endy
- the northern-most latitude.LineType
- the type of line to use on the rectangles -
Cylindrical projections can use straight lines, but
other projections should use Rhumb lines.
public boolean readCoverageFile(java.lang.String coverage)
coverage
- the path to the file.
protected boolean readCoverageFile(java.lang.String urlCov, java.lang.String coverage)
urlCov
- an url to a coverage file, if available. Should
be null if not used.coverage
- the path to the file.
protected boolean[] convertBytesToBooleans(byte[] row)
row
- array of bytes
protected byte[] convertBooleansToBytes(boolean[] row)
row
- the input array of booleans
public void writeCoverageFile(java.lang.String covFilename)
covFilename
- the file name to write the arrays into.public void addProgressListener(ProgressListener list)
public void removeProgressListener(ProgressListener list)
public void clearProgressListeners()
protected void fireProgressUpdate(int type, java.lang.String task, int frameNumber, int totalFrames)
frameNumber
- the current frame counttotalFrames
- the total number of frames.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |