public class RpfUtil
extends java.lang.Object
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.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
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 BOUNDARYprotected 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 entryprotected 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)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details