public class VariableEstimator extends java.lang.Object implements Encodable, ValueSource
VariableEstimator
class provides an
approximation of smoothly changing variable data using
quadratic polynomials. Currently only 1D and 2D data
variables are supported. The estimator uses an EarthPartition
object and derives the polynomials
individually on each partition. If the polynomials cannot be
derived for a given partition (due to small partition size or
missing data values), a Double.NaN
value is
returned by getValue(noaa.coastwatch.util.DataLocation)
for any location in the affected
partition.Constructor and Description |
---|
VariableEstimator(DataVariable var,
EarthTransform trans,
double maxSize,
int[] maxDims)
Constructs a variable estimator for the specified variable
and earth transform.
|
VariableEstimator(DataVariable var,
Filter filter,
EarthTransform trans,
double maxSize,
int[] maxDims)
Constructs a variable estimator for the specified variable,
filter, and earth transform.
|
VariableEstimator(DataVariable var,
Filter filter,
VariableEstimator est)
Constructs a variable estimator for the specified variable and
filter using the same earth transform and partitioning as the
specified variable estimator.
|
VariableEstimator(DataVariable var,
VariableEstimator est)
Constructs a variable estimator for the specified variable using
the same earth transform and partitioning as the specified
variable estimator.
|
VariableEstimator(java.lang.Object obj)
Constructs a variable estimator from the specified encoding.
|
VariableEstimator(java.lang.Object obj,
VariableEstimator est)
Constructs a variable estimator from the specified encoding and
the same earth transform and partitioning as the specified
variable estimator.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getEncoding()
Gets an encoded representation of this variable estimator.
|
double |
getValue(DataLocation loc)
Gets an estimated variable value.
|
void |
useEncoding(java.lang.Object obj)
Constructs an estimator from the specified encoding.
|
public VariableEstimator(DataVariable var, VariableEstimator est)
var
- the data variable for estimation.est
- the variable estimator to use for earth partitioning
information.public VariableEstimator(DataVariable var, Filter filter, VariableEstimator est)
var
- the data variable for estimation.filter
- the data filtering function. The filter is called
with the data value array for each partition prior to creating
the estimator object.est
- the variable estimator to use for earth partitioning
information.public VariableEstimator(DataVariable var, EarthTransform trans, double maxSize, int[] maxDims) throws java.lang.UnsupportedOperationException
var
- the data variable for estimation.trans
- the earth transform to use for partitioning.maxSize
- the maximum polynomial partition size in
kilometers.maxDims
- the maximum partition size in any dimension
in terms of data locations.java.lang.UnsupportedOperationException
- if the variable rank is not
supported.EarthPartition
public VariableEstimator(DataVariable var, Filter filter, EarthTransform trans, double maxSize, int[] maxDims) throws java.lang.UnsupportedOperationException
var
- the data variable for estimation.filter
- the data filtering function. The filter is called
with the data value array for each partition prior to creating
the estimator object.trans
- the earth transform to use for partitioning.maxSize
- the maximum polynomial partition size in
kilometers.maxDims
- the maximum partition size in any dimension
in terms of data locations.java.lang.UnsupportedOperationException
- if the variable rank is not
supported.EarthPartition
public VariableEstimator(java.lang.Object obj)
getEncoding
.obj
- the object encoding.getEncoding()
public VariableEstimator(java.lang.Object obj, VariableEstimator est)
obj
- the variable estimator encoding.est
- the variable estimator to use for earth partitioning
information.public double getValue(DataLocation loc)
getValue
in interface ValueSource
loc
- the data value location.public java.lang.Object getEncoding()
getEncoding
in interface Encodable
Object[3]
array containing:
BitSet
object used for encoding partition
structure informationList
of double[]
coordinates
specifying partition boundaries as min and max (2 arrays per
partition)List
of double[]
arrays specifying
partition estimator coefficientsuseEncoding(java.lang.Object)
public void useEncoding(java.lang.Object obj)
getEncoding
.useEncoding
in interface Encodable
obj
- the object encoding.getEncoding()