|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.util.cacheHandler.CacheHandler com.bbn.openmap.dataAccess.asrp.ASRPDirectory
public class ASRPDirectory
An ASRP directory contains information needed to view images. It contains multiple files, each containing complementary information about the image. The GeneralInformationFile (GEN) contains information about the image such as coverage and location. The QualityFile (QAL) contains accuracy and color information. The GeoReferenceFile (GER) contains projection information, the SourceFile (SOU) contains information about the map that was used to create the images. The RasterGeoDataFile (IMG) contains the actual pixel information.
This class knows how to use all of these files to create images, which are made up of subframe tiles called blocks.
Field Summary | |
---|---|
protected int |
arv
Number of pixels 360 degrees east - west. |
protected OMRect |
bounds
The OMRect used to track coverage boundaries. |
protected int |
brv
Number of pixels 360 degrees north - south. |
protected java.awt.Color[] |
colors
The colors from the QAL file. |
protected float |
degPerHorBlock
Calculated number of degrees per block in the horizontal direction. |
protected float |
degPerVerBlock
Calculated number of degrees per block in the vertical direction. |
protected java.io.File |
dir
|
protected GeneralInformationFile |
gen
|
protected GeoReferenceFile |
ger
|
protected RasterGeoDataFile |
img
|
protected float |
lso
|
protected float |
nea
|
protected float |
neo
|
protected int |
numHorBlocks_N
Number of horizontal blocks. |
protected int |
numHorPixels_Q
Number of horizontal pixels per block. |
protected int |
numVerBlocks_M
Number of vertical blocks. |
protected int |
numVerPixels_P
Number of vertical pixels per block. |
protected int |
pixelCountBits
When reading image bytes, the number of bits that represent the number of pixels the next color index stands for. |
protected int |
pixelValueBits
When reading image bytes, the number of bits that represent the color index. |
protected float |
pso
|
protected QualityFile |
qal
|
protected double |
scaleFactor
Protective mechanism, doesn't display data that has images with a base scale that is more than a factor of the scaleFactor away from the scale of the map. |
protected SourceFile |
sou
|
protected float |
swa
|
protected float |
swo
|
protected int |
tileDataOffset
Byte offset into the IMG file where tile data starts. |
protected java.util.List |
tsi
List of tile indexes. |
Fields inherited from class com.bbn.openmap.util.cacheHandler.CacheHandler |
---|
DEFAULT_MAX_CACHE_SIZE, logger, logicalClock, objs |
Fields inherited from interface com.bbn.openmap.dataAccess.asrp.ASRPConstants |
---|
GEN_NAME, GER_NAME, IMAGE_NAME, QAL_NAME, SOURCE_NAME, TRANS |
Constructor Summary | |
---|---|
ASRPDirectory(java.lang.String path)
Create a new ASRP directory for the given path. |
Method Summary | |
---|---|
OMGraphicList |
checkProjAndGetTiledImages(Projection proj)
Get an OMGraphicList of files that cover the projection. |
OMScalingRaster |
getBlock(int x,
int y)
Fetch the subframe tile block from the IMG file. |
OMRect |
getBounds()
Get the OMRect used for calculating coverage area. |
protected java.awt.Color[] |
getColors()
Get the colors from the QAL file. |
java.lang.String |
getPath()
|
double |
getScaleFactor()
|
OMGraphicList |
getTiledImages(Projection proj)
Assumes that the projection checks have occurred, have passed, and just fetches the image tiles. |
protected OMGraphicList |
getTiledImages(java.awt.Rectangle rect,
Projection proj)
Provide an OMGraphicList containing the tile blocks described by the rectangle. |
protected void |
initialize(java.lang.String dirPath,
java.lang.String root,
java.lang.String DD)
Read in the attribute information about the data. |
boolean |
isOnMap(Projection proj)
Return true of current bounds covers the projection area. |
CacheObject |
load(java.lang.Object key)
Load a block image into the cache, based on the relative coordinates of the block as a key. |
static void |
main(java.lang.String[] argv)
|
void |
setScaleFactor(double scaleFactorIn)
|
boolean |
validScale(Projection proj)
|
Methods inherited from class com.bbn.openmap.util.cacheHandler.CacheHandler |
---|
clear, get, getCacheSize, listIterator, replaceLeastUsed, resetCache, resetCache, searchCache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected GeneralInformationFile gen
protected QualityFile qal
protected RasterGeoDataFile img
protected GeoReferenceFile ger
protected SourceFile sou
protected java.util.List tsi
protected int numHorBlocks_N
protected int numVerBlocks_M
protected int numHorPixels_Q
protected int numVerPixels_P
protected int pixelCountBits
protected int pixelValueBits
protected float swo
protected float nea
protected float neo
protected float swa
protected float lso
protected float pso
protected int arv
protected int brv
protected float degPerHorBlock
protected float degPerVerBlock
protected int tileDataOffset
protected java.awt.Color[] colors
protected OMRect bounds
protected java.io.File dir
protected double scaleFactor
Constructor Detail |
---|
public ASRPDirectory(java.lang.String path)
Method Detail |
---|
public java.lang.String getPath()
public OMRect getBounds()
public void setScaleFactor(double scaleFactorIn)
public double getScaleFactor()
public boolean isOnMap(Projection proj)
public boolean validScale(Projection proj)
public OMGraphicList checkProjAndGetTiledImages(Projection proj) throws java.io.IOException
java.io.IOException
public OMGraphicList getTiledImages(Projection proj) throws java.io.IOException
java.io.IOException
protected OMGraphicList getTiledImages(java.awt.Rectangle rect, Projection proj) throws java.io.IOException
rect
- rectangle defining the tile blocks to get. rect.x and rect.y
describe the starting upper left block to get, rect.getWidth and
rect.getHeight describe the number of tiles to the right and down
from the first block to collect.
java.io.IOException
public OMScalingRaster getBlock(int x, int y) throws java.io.IOException
java.io.IOException
protected java.awt.Color[] getColors()
protected void initialize(java.lang.String dirPath, java.lang.String root, java.lang.String DD) throws java.io.IOException
dirPath
- path to the ASRP directory.root
- name of all of the files, usually the same as the ASRP
directory itself.DD
- the occurrence number, usually '01' of the files.
java.io.IOException
public CacheObject load(java.lang.Object key)
load
in class CacheHandler
key
- String of form 'x,y' identifying the relative location of
the subframe image.
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |