public class DTEDLocator extends Wanderer implements WandererCallback
Usage: java com.bbn.openmap.dataAccess.dted.DTEDLocator (dir path) ...
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedList |
filenames |
protected java.io.File[][][] |
files |
protected int |
numLevels |
protected DTEDNameTranslator |
translator |
exhaustiveSearch, topToBottom
Constructor and Description |
---|
DTEDLocator()
Create a DTEDLocator, expect to set the top level DTED directory later.
|
DTEDLocator(java.io.File dtedDir)
Create the DTEDLocator and start searching from the directory specificed.
|
DTEDLocator(java.lang.String directory)
Create the DTEDLocator and start searching from the directory specificed.
|
Modifier and Type | Method and Description |
---|---|
java.io.File |
get(float lat,
float lon,
int level)
Get the File object for a latitude, longitude and level.
|
DTEDNameTranslator |
getTranslator()
Get the DTEDNameTranslator that knows how to interpret where a DTED file
covers based on its name.
|
boolean |
handleDirectory(java.io.File directory)
Does nothing, nothing is done for directories.
|
boolean |
handleFile(java.io.File file)
When a file is found, add it.
|
protected void |
initFileHolder()
Initialize the holding arrays.
|
static void |
main(java.lang.String[] argv)
Given a set of files or directories, parade through them to find files
that end with '`', or files that start with '.#', and delete them.
|
void |
organize()
After all the files have been located, organized them spatially in the 3D
array.
|
void |
setTranslator(DTEDNameTranslator dnt)
Set the DTEDNameTranslator that knows how to interpret where a DTED file
covers based on its name.
|
getCallback, handleDirectory, handleEntry, isExhaustiveSearch, isTopToBottom, setCallback, setExhaustiveSearch, setTopToBottom
protected DTEDNameTranslator translator
protected java.util.LinkedList filenames
protected java.io.File[][][] files
protected int numLevels
public DTEDLocator()
public DTEDLocator(java.lang.String directory)
public DTEDLocator(java.io.File dtedDir)
protected void initFileHolder()
public boolean handleDirectory(java.io.File directory)
handleDirectory
in interface WandererCallback
directory
- that represents a directory to deal with.public boolean handleFile(java.io.File file)
handleFile
in interface WandererCallback
file
- to handle.public DTEDNameTranslator getTranslator()
public void setTranslator(DTEDNameTranslator dnt)
public void organize()
public java.io.File get(float lat, float lon, int level)
public static void main(java.lang.String[] argv)
argv
- paths to files or directories, use -h to get a usage
statement.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details