|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.rpf.RpfUtil
public class RpfUtil
The RpfUtil is a program that will allow you to manage RPF data geographically. You can copy and delete RPF data frames from RPF data directories, make an A.TOC file for a RPF directory (even after copying and/or deleting), and you can zip an RPF directory into an archive if you like. You can limit the commands to only affect those frames completely inside or outside a specified area, or for those frames that intersect and are contained by that area (default). You can also limit the charts affected based on their map scales, providing a scale and indicating that you only want those frames that match the scale, do not match the scale, are greater or less than the scale. Greater than or less than refers to the scale number of the chart being greater or less than the scale number provided, NOT whether the resulting scale ratio is greater or less than. These things are opposite if each other, and we're just working with the numbers.
When you call RpfUtil.setRpfDir, that calls organizeFrames(rpfDir), which creates a list of the frames affected by the scale and boundary settings. Then, the operation runs on those frames.
It is important that the A.TOC file in the source RPF directory reflects the current state of the data in that directory. If you are not sure, run this program with the -maketoc option on that directory to update it.
Field Summary | |
---|---|
static float |
ALL_SCALES
|
protected int |
boundaryLimits
|
static int |
BOUNDED
|
protected java.util.List<java.lang.String> |
frameList
|
static int |
INSIDE
|
protected float |
leftLon
|
protected float |
lowerLat
|
static int |
OUTSIDE
|
protected float |
rightLon
|
protected java.lang.String |
rpfDir
|
protected float |
scale
|
static char |
SCALE_EQUALS
|
static char |
SCALE_GREATERTHAN
|
static char |
SCALE_LESSTHAN
|
static char |
SCALE_NOTEQUALS
|
protected char |
scaleDelim
|
protected float |
upperLat
|
protected boolean |
verbose
|
Constructor Summary | |
---|---|
RpfUtil()
Create a default RpfUtil considering all data. |
|
RpfUtil(float ulat,
float llon,
float llat,
float rlon)
Create a RpfUtil considering data intersecting the provided boundary. |
|
RpfUtil(java.lang.String rpfDir,
float ulat,
float llon,
float llat,
float rlon)
Create a RpfUtil considering data intersecting the provided boundary, involving the provided RPF directory. |
|
RpfUtil(java.lang.String rpfDir,
float ulat,
float llon,
float llat,
float rlon,
float scale,
char scaleDelimiter,
int boundaryLimits)
Full control over the RpfUtil settings. |
Method Summary | |
---|---|
boolean |
copy(java.lang.String toRpfDir)
Copy the frame files currently set on the FrameList to the provided RPF directory. |
boolean |
delete(java.lang.String rpfDir)
Delete the files in the provided RPF directory that match the current scale and boundary settings. |
protected boolean |
frameFitsCriteria(double left,
double right,
double up,
double down,
double rlinterval,
double udinterval)
Geographical evaluation of frame file |
int |
getBoundaryLimits()
|
java.util.List<java.lang.String> |
getFrameList()
|
protected java.util.List<java.lang.String> |
getFrameList(RpfTocEntry entry,
double rlinterval,
double udinterval)
Middle management for frames for A.TOC entry box. |
float |
getLeftLon()
|
float |
getLowerLat()
|
float |
getRightLon()
|
java.lang.String |
getRpfDir()
|
float |
getScale()
|
char |
getScaleDelim()
|
float |
getUpperLat()
|
static void |
main(java.lang.String[] args)
The RpfUtil class can be run as a java program. |
boolean |
maketoc(java.lang.String rpfDir)
Create an A.TOC file for the provided RPF directory. |
protected java.util.List<java.lang.String> |
organizeFrames(java.lang.String rpfDir)
Creates the list of frames to consider, based on settings. |
void |
query(java.lang.String rpfDir)
Just run a query on the provided directory, listing the names of the frames that will be affected by the current scale and boundary settings. |
void |
setBoundaryLimits(int boundaryLimits)
Set whether the frames need to be INSIDE, OUTSIDE or inside and touching the BOUNDARY of the geographical area set in the RpfUtil object. |
void |
setFrameList(java.util.List<java.lang.String> frameList)
|
void |
setLeftLon(float leftLon)
|
void |
setLowerLat(float lowerLat)
|
void |
setRightLon(float rightLon)
|
void |
setRpfDir(java.lang.String rpfDir)
Creates the list of frames matching the geographical and scale parameters of the frames within the directory. |
void |
setScale(float scale)
|
void |
setScaleDelim(char scaleDelim)
Set whether the frames considered should have scale numbers greater than (g), less than (l), not equal to (n) or equal to (e). |
void |
setUpperLat(float upperLat)
|
boolean |
zip(java.lang.String zipLocation,
java.lang.String toBeZippedName)
Store the contents of the toBeZippedName directory into a zip file with the provided name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char SCALE_EQUALS
public static final char SCALE_NOTEQUALS
public static final char SCALE_GREATERTHAN
public static final char SCALE_LESSTHAN
public static final float ALL_SCALES
public static final int BOUNDED
public static final int INSIDE
public static final int OUTSIDE
protected int boundaryLimits
protected float scale
protected char scaleDelim
protected float upperLat
protected float leftLon
protected float lowerLat
protected float rightLon
protected java.lang.String rpfDir
protected boolean verbose
protected java.util.List<java.lang.String> frameList
Constructor Detail |
---|
public RpfUtil()
public RpfUtil(float ulat, float llon, float llat, float rlon)
ulat
- upper latitudellon
- left longitudellat
- lower latituderlon
- right longitudepublic RpfUtil(java.lang.String rpfDir, float ulat, float llon, float llat, float rlon)
rpfDir
- the RPF directory to search and consider frames
over.ulat
- upper latitudellon
- left longitudellat
- lower latituderlon
- right longitudepublic RpfUtil(java.lang.String rpfDir, float ulat, float llon, float llat, float rlon, float scale, char scaleDelimiter, int boundaryLimits)
rpfDir
- the RPF directory to search and consider frames
over.ulat
- upper latitudellon
- left longitudellat
- lower latituderlon
- right longitudescale
- the scale of the charts to consider.scaleDelimiter
- character 'g'reater than, 'l'ess than,
'n'ot equal to, 'e'qual to. e is the default.boundaryLimits
- INSIDE, OUTSIDE or BOUNDARYMethod Detail |
---|
protected java.util.List<java.lang.String> organizeFrames(java.lang.String rpfDir)
rpfDir
-
protected java.util.List<java.lang.String> getFrameList(RpfTocEntry entry, double rlinterval, double udinterval)
entry
- RpfTocEntry to consider.rlinterval
- right to left decimal degree interval for
entry.udinterval
- up to down decimal degree interval for entry
protected boolean frameFitsCriteria(double left, double right, double up, double down, double rlinterval, double udinterval)
public boolean copy(java.lang.String toRpfDir)
toRpfDir
-
public boolean maketoc(java.lang.String rpfDir)
rpfDir
-
public boolean delete(java.lang.String rpfDir)
rpfDir
-
public boolean zip(java.lang.String zipLocation, java.lang.String toBeZippedName)
zipLocation
- toBeZippedName
-
public void query(java.lang.String rpfDir)
rpfDir
- public static void main(java.lang.String[] args)
args
- public int getBoundaryLimits()
public void setBoundaryLimits(int boundaryLimits)
boundaryLimits
- public java.util.List<java.lang.String> getFrameList()
public void setFrameList(java.util.List<java.lang.String> frameList)
public float getLeftLon()
public void setLeftLon(float leftLon)
public float getLowerLat()
public void setLowerLat(float lowerLat)
public float getRightLon()
public void setRightLon(float rightLon)
public java.lang.String getRpfDir()
public void setRpfDir(java.lang.String rpfDir)
rpfDir
- public float getScale()
public void setScale(float scale)
public char getScaleDelim()
public void setScaleDelim(char scaleDelim)
scaleDelim
- public float getUpperLat()
public void setUpperLat(float upperLat)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |