|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.layer.util.cacheHandler.CacheHandler | +--com.bbn.openmap.layer.rpf.RpfFrameCacheHandler
The RpfFrameCacheHandler does everything involved with handling RAW RPF frames. If used locally, it can also deal with filling the role of RpfFrameProvider. You create one of these with the paths to the RPF directories, and then hand it to something that needs a RpfFrameProvider, or that acts like one.
Field Summary | |
protected RpfColortable |
colortable
Colortable used on the frames. |
protected boolean |
Dchum
For future use... |
static int |
FRAME_CACHE_SIZE
|
protected boolean |
outlineChum
Special outlining for chummed subframes |
protected RpfTocHandler[] |
tocs
The Table of Contents files, parsed and ready to use. |
protected RpfViewAttributes |
viewAttributes
View and display attributes for the data. |
Fields inherited from class com.bbn.openmap.layer.util.cacheHandler.CacheHandler |
DEFAULT_MAX_CACHE_SIZE, logicalClock, objs |
Constructor Summary | |
RpfFrameCacheHandler(RpfTocHandler[] tocHandlers)
When you pre-initialize the RpfTocHandlers before giving them to the RpfFrameCacheHandler. |
|
RpfFrameCacheHandler(java.lang.String[] RpfPaths)
The default constructor. |
|
RpfFrameCacheHandler(java.lang.String[] RpfPaths,
int max_size)
The constructor to use if you want to modify the number of frames held in the cache.. |
Method Summary | |
protected void |
checkColortable(RpfFrame frame,
RpfFrameEntry frameEntry,
RpfTocEntry entry,
int tocNumber,
int entryNumber)
Take a bunch of stuff that has already been calculated, and then figure out if a new colortable is needed. |
static RpfTocHandler[] |
createTocHandlers(java.lang.String[] RpfPaths)
Set up the A.TOC files, to find out what coverage there is. |
java.lang.Object |
get(RpfFrameEntry rfe)
A customized way to retrieve a frame from the cache, using a RpfFrameEntry. |
float |
getCalculatedCoverage(float ullat,
float ullon,
float lrlat,
float lrlon,
CADRG p,
java.lang.String chartSeries)
Given an area and a two-letter chart series code, find the percentage of coverage on the map that that chart series can offer. |
java.util.Vector |
getCatalogCoverage(float ullat,
float ullon,
float lrlat,
float lrlon,
CADRG proj,
java.lang.String chartSeries)
RpfFrameProvider interface method. |
RpfColortable |
getColortable()
|
java.util.Vector |
getCoverage(float ullat,
float ullon,
float lrlat,
float lrlon,
CADRG proj)
Given a projection which describes the map (or area of interest), return the best RpfTocEntry, from all the A.TOC, that covers the area. |
RpfIndexedImageData |
getRawSubframeData(int tocNumber,
int entryNumber,
int x,
int y)
|
java.lang.String |
getSubframeAttributes(int tocNumber,
int entryNumber,
int x,
int y)
Given the indexes to a certain RpfTocEntry within a certain A.TOC, find the frame and return the attribute information. |
int[] |
getSubframeData(int tocNumber,
int entryNumber,
int x,
int y)
Given the indexes to a certain RpfTocEntry within a certain A.TOC, find the frame/subframe data, decompress it, and return image pixels. |
CacheObject |
load(RpfFrameEntry rfe)
Cachehandler method. |
CacheObject |
load(java.lang.String RpfFramePath)
Cachehandler method. |
boolean |
needViewAttributeUpdates()
RpfFrameProvider interface method. |
void |
resetCache()
CacheHandler method. |
void |
resizeCache(int max_size)
Cachehandler method. |
static float |
scaleDifference(CADRG proj,
RpfCoverageBox box)
|
void |
setViewAttributes(RpfViewAttributes va)
Should only be set via the object it is sending frame data to. |
Methods inherited from class com.bbn.openmap.layer.util.cacheHandler.CacheHandler |
clear, get, getCacheSize, listIterator, replaceLeastUsed, resetCache, searchCache |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FRAME_CACHE_SIZE
protected RpfColortable colortable
protected boolean Dchum
protected boolean outlineChum
protected RpfTocHandler[] tocs
protected RpfViewAttributes viewAttributes
Constructor Detail |
public RpfFrameCacheHandler(java.lang.String[] RpfPaths)
RpfPaths
- the directory paths to the RPF directories.public RpfFrameCacheHandler(java.lang.String[] RpfPaths, int max_size)
RpfPaths
- the directory paths to the RPF directories.public RpfFrameCacheHandler(RpfTocHandler[] tocHandlers)
Method Detail |
public boolean needViewAttributeUpdates()
needViewAttributeUpdates
in interface RpfFrameProvider
public void setViewAttributes(RpfViewAttributes va)
setViewAttributes
in interface RpfFrameProvider
public java.util.Vector getCatalogCoverage(float ullat, float ullon, float lrlat, float lrlon, CADRG proj, java.lang.String chartSeries)
getCatalogCoverage
in interface RpfFrameProvider
ullat
- NW latitude.ullon
- NW longitude.lrlat
- SE latitude.lrlon
- SE longitudeproj
- CADRG projection to use for zone decisions.chartSeries
- RpfProductInfo.seriesCode entry.
public float getCalculatedCoverage(float ullat, float ullon, float lrlat, float lrlon, CADRG p, java.lang.String chartSeries)
getCalculatedCoverage
in interface RpfFrameProvider
ullat
- NW latitude.ullon
- NW longitude.lrlat
- SE latitude.lrlon
- SE longitudep
- projection to use for zone decisions.chartSeries
- RpfProductInfo.seriesCode entry.
getCatalogCoverage(float, float, float, float, com.bbn.openmap.proj.CADRG, java.lang.String)
public java.util.Vector getCoverage(float ullat, float ullon, float lrlat, float lrlon, CADRG proj)
getCoverage
in interface RpfFrameProvider
ullat
- NW latitude.ullon
- NW longitude.lrlat
- SE latitude.lrlon
- SE longitudeproj
- CADRG projection to use for zone decisions.
public java.lang.String getSubframeAttributes(int tocNumber, int entryNumber, int x, int y)
getSubframeAttributes
in interface RpfFrameProvider
tocNumber
- the toc id for a RpfTocHandler for a
particular frame provider.entryNumber
- the RpfTocEntry id for a RpfTocHandler for a
particular frame provider.x
- the horizontal subframe index, from the left side of a
boundary rectangle of the entry.y
- the vertical subframe index, from the top side of a
boundary rectangle of the entry.
getCoverage(float, float, float, float, com.bbn.openmap.proj.CADRG)
public int[] getSubframeData(int tocNumber, int entryNumber, int x, int y)
getSubframeData
in interface RpfFrameProvider
tocNumber
- the toc id for a RpfTocHandler for a
particular frame provider.entryNumber
- the RpfTocEntry id for a RpfTocHandler for a
particular frame provider.x
- the horizontal subframe index, from the left side of a
boundary rectangle of the entry.y
- the vertical subframe index, from the top side of a
boundary rectangle of the entry.
getCoverage(float, float, float, float, com.bbn.openmap.proj.CADRG)
public RpfIndexedImageData getRawSubframeData(int tocNumber, int entryNumber, int x, int y)
getRawSubframeData
in interface RpfFrameProvider
protected void checkColortable(RpfFrame frame, RpfFrameEntry frameEntry, RpfTocEntry entry, int tocNumber, int entryNumber)
public static RpfTocHandler[] createTocHandlers(java.lang.String[] RpfPaths)
RpfPaths
- the paths to the RPF directories.
public CacheObject load(java.lang.String RpfFramePath)
load
in class CacheHandler
public java.lang.Object get(RpfFrameEntry rfe)
public CacheObject load(RpfFrameEntry rfe)
public void resizeCache(int max_size)
public void resetCache()
resetCache
in class CacheHandler
public static float scaleDifference(CADRG proj, RpfCoverageBox box)
public RpfColortable getColortable()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |