public class LocationEstimator
extends java.lang.Object
LocationEstimator
class uses a reference and
target earth transform to estimate the data location of a target
point given a reference point. The following diagram shows the two
reference frames, with an arrow showing the direction of estimation:
*----*----* *----*----* | /----------\ | | L | | o | | o | | | target = f(ref) | target | | ref | | point | | point | *----*----* *----*----*An earth partition is used to divide the reference into equal size partitions, upon which a set of polynomials is calculated to estimate locations. Currently the location estimator class is limited to 2D earth transforms. The location lookup operation has two modes: accurate and fast. In accurate mode, partitions with insufficient data coverage from the target transform are queried by performing the data location transform explicitly. In fast mode, partitions with insufficient coverage return an invalid data location for any query point. WARNING: This class is not thread-safe.
EarthTransform
,
EarthPartition
Modifier and Type | Field and Description |
---|---|
static int |
ACCURATE
The accurate location query mode.
|
static int |
FAST
The fast location query mode.
|
static int |
MAX_INTERVALS
The maximum number of data sampling intervals within one partition.
|
Constructor and Description |
---|
LocationEstimator(EarthTransform refTrans,
int[] refDims,
EarthTransform targetTrans,
int[] targetDims,
java.awt.geom.AffineTransform targetNav,
double size)
Creates a location estimator based on the specified Earth
transforms.
|
Modifier and Type | Method and Description |
---|---|
DataLocation |
getLocation(DataLocation refLoc)
Gets the target location for the specified reference location.
|
DataLocation |
getLocation(DataLocation refLoc,
DataLocation targetLoc)
Gets the target location for the specified reference location.
|
void |
setQueryMode(int mode)
Sets the location query mode,
FAST or
ACCURATE . |
public static final int FAST
public static final int ACCURATE
public static final int MAX_INTERVALS
public LocationEstimator(EarthTransform refTrans, int[] refDims, EarthTransform targetTrans, int[] targetDims, java.awt.geom.AffineTransform targetNav, double size) throws java.lang.UnsupportedOperationException
ACCURATE
.refTrans
- the reference earth transform. This is the
transform against which data location queries will be made.refDims
- the reference dimensions. Queries are limited to
locations within these dimensions.targetTrans
- the target earth transform. This is the
transform for which queries will return a data location.targetDims
- the target dimensions. Target points outside
these dimensions are considered out of bounds.targetNav
- the target navigation transform. If not null,
this transformation is used to correct coordinate locations in
the target transform prior to calculating the polynomial
estimators.size
- the estimation polynomial size in kilometers.java.lang.UnsupportedOperationException
- if the dimension rank is not
supported.public void setQueryMode(int mode)
FAST
or
ACCURATE
.public DataLocation getLocation(DataLocation refLoc, DataLocation targetLoc)
refLoc
- the reference location.targetLoc
- the target location or null. If null, an object
is created and returned. If non-null, the object is simply
modified.public DataLocation getLocation(DataLocation refLoc)
refLoc
- the reference location.