|
||||||||||
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.layer.rpf.RpfFrameCacheHandler
public class 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.util.cacheHandler.CacheHandler |
---|
DEFAULT_MAX_CACHE_SIZE, logger, 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(double ullat,
double ullon,
double lrlat,
double lrlon,
Projection 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<RpfCoverageBox> |
getCatalogCoverage(double ullat,
double ullon,
double lrlat,
double lrlon,
Projection proj,
java.lang.String chartSeries)
RpfFrameProvider interface method. |
RpfColortable |
getColortable()
|
java.util.Vector<RpfCoverageBox> |
getCoverage(double ullat,
double ullon,
double lrlat,
double lrlon,
Projection 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(java.lang.Object key)
Called from get if the key doesn't exist, to "load" the new object into the cache before returning it. |
boolean |
needViewAttributeUpdates()
RpfFrameProvider interface method. |
void |
resetCache()
CacheHandler method. |
void |
resizeCache(int max_size)
Cachehandler method. |
static float |
scaleDifference(Projection proj,
RpfCoverageBox box)
|
void |
setColortable(RpfColortable colortable)
|
void |
setViewAttributes(RpfViewAttributes va)
Should only be set via the object it is sending frame data to. |
Methods inherited from class com.bbn.openmap.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<RpfCoverageBox> getCatalogCoverage(double ullat, double ullon, double lrlat, double lrlon, Projection proj, java.lang.String chartSeries)
getCatalogCoverage
in interface RpfFrameProvider
ullat
- NW latitude.ullon
- NW longitude.lrlat
- SE latitude.lrlon
- SE longitudeproj
- projection to use for zone decisions.chartSeries
- RpfProductInfo.seriesCode entry.
public float getCalculatedCoverage(double ullat, double ullon, double lrlat, double lrlon, Projection 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(double, double, double, double, com.bbn.openmap.proj.Projection, java.lang.String)
public java.util.Vector<RpfCoverageBox> getCoverage(double ullat, double ullon, double lrlat, double lrlon, Projection 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(double, double, double, double, com.bbn.openmap.proj.Projection)
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(double, double, double, double, com.bbn.openmap.proj.Projection)
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 java.lang.Object get(RpfFrameEntry rfe)
public CacheObject load(java.lang.Object key)
CacheHandler
load
in class CacheHandler
public void resizeCache(int max_size)
public void resetCache()
resetCache
in class CacheHandler
public static float scaleDifference(Projection proj, RpfCoverageBox box)
public RpfColortable getColortable()
public void setColortable(RpfColortable colortable)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |