public class RpfFrameCacheHandler extends CacheHandler implements RpfFrameProvider
Modifier and Type | Field and Description |
---|---|
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.
|
DEFAULT_MAX_CACHE_SIZE, logger, logicalClock, objs
Constructor and Description |
---|
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..
|
Modifier and Type | Method and Description |
---|---|
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,
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(float ullat,
float ullon,
float lrlat,
float lrlon,
Projection proj,
java.lang.String chartSeries)
RpfFrameProvider interface method.
|
RpfColortable |
getColortable() |
java.util.Vector<RpfCoverageBox> |
getCoverage(float ullat,
float ullon,
float lrlat,
float 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.
|
clear, get, getCacheSize, listIterator, replaceLeastUsed, resetCache, searchCache
public static final int FRAME_CACHE_SIZE
protected RpfColortable colortable
protected boolean Dchum
protected boolean outlineChum
protected RpfTocHandler[] tocs
protected RpfViewAttributes viewAttributes
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)
public boolean needViewAttributeUpdates()
needViewAttributeUpdates
in interface RpfFrameProvider
public void setViewAttributes(RpfViewAttributes va)
setViewAttributes
in interface RpfFrameProvider
public java.util.Vector<RpfCoverageBox> getCatalogCoverage(float ullat, float ullon, float lrlat, float 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(float ullat, float ullon, float lrlat, float 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(float, float, float, float, com.bbn.openmap.proj.Projection, java.lang.String)
public java.util.Vector<RpfCoverageBox> getCoverage(float ullat, float ullon, float lrlat, float 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(float, float, float, float, 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(float, float, float, float, 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)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details