visad
Interface FlatFieldIface

All Superinterfaces:
Data, Field, Function, Thing
All Known Subinterfaces:
RemoteFlatField
All Known Implementing Classes:
AreaImageCacheAdapter, CachedFlatField, FileFlatField, FlatField, ImageFlatField, JamaMatrix, NavigatedImage, RemoteFlatFieldImpl, SatelliteImage, SingleBandedImageImpl, Sounding, Spectrum

public interface FlatFieldIface
extends Field

FlatField is the VisAD class for finite samplings of functions whose range type and range coordinate systems are simple enough to allow efficient representation. The DomainSet, DomainCoordinateSystem, RangeSet, RangeCoordinateSystem and RangeCoordinateSystems variables of FlatField are immutable.

A FlatField range type may be either a RealType (for a function with range = R), a RealTupleType (for a function with range = R^n for n > 0), or a TupleType of RealType-s and RealTupleType-s..

VisAD avoids invoking methods once per datum through the use of FlatField's. These are logically Field's of Tuple's of RealType's and RealTupleType's. Internally FlatField's are stored as arrays of numerical values, rather than the arrays of data objects stored in Field's. Many of the methods in the FlatField class and in other classes (e.g., CoordinateTransform, Set, Unit) process data in the form double[Dimension][Length] where Length is the number of samples in a Field and Dimension is the number of Tuple elements in the Field range values. Note that the order of the Length and Dimension indices are reversed as array indices. This allows efficient processing of long columns of Field value components. For example, if Latitude is one component of Field values, then any computation involving Latitude can be applied in a tight loop to all Latitude's in the Field.

FlatField's support range types more general than RealTuple's. To understand the motive, consider a set of observations that include Latitude, Longitude, Altitude, Pressure, Temperature, etc. We can organize these as a Field whose range values have the Tuple type:


     (Latitude, Longitude, Altitude, Pressure, Temperature, ...)

However, in order to declare that (Latitude, Longitude, Altitude) is a coordinate system with coordinate transform functions to other spatial coordinate systems, we need to organize:


     (Latitude, Longitude, Altitude)

as a RealTupleType. Hence the range type of the Field of observations must be:


     ((Latitude, Longitude, Altitude), Pressure, Temperature, ...)

which is not a RealTupleType (since one of its components is a RealTupleType). In order to process such data efficiently, FlatField's must support range types that are Tuple's of RealType's and RealTupleType's.


Field Summary
 
Fields inherited from interface visad.Data
ABS, ACOS, ACOS_DEGREES, ADD, ASIN, ASIN_DEGREES, ATAN, ATAN_DEGREES, ATAN2, ATAN2_DEGREES, CEIL, COS, COS_DEGREES, DEGREES_TO_RADIANS, DEPENDENT, DIVIDE, EXP, FLOOR, INDEPENDENT, INV_ATAN2, INV_ATAN2_DEGREES, INV_DIVIDE, INV_POW, INV_REMAINDER, INV_SUBTRACT, LOG, MAX, MIN, MULTIPLY, NEAREST_NEIGHBOR, NEGATE, NO_ERRORS, NOP, POW, RADIANS_TO_DEGREES, REMAINDER, RINT, ROUND, SIN, SIN_DEGREES, SQRT, SUBTRACT, TAN, TAN_DEGREES, WEIGHTED_AVERAGE
 
Method Summary
 void clearMissing()
          mark this FlatField as non-missing
 Field convertToField()
          convert this FlatField to a (non-Flat) FieldImpl
 int getRangeDimension()
          Gets the number of components in the "flat" range.
 ErrorEstimate[] getRangeErrors()
          return array of ErrorEstimates associated with each RealType component of range; each ErrorEstimate is a mean error for all samples of a range RealType component
 Set[] getRangeSets()
          Returns the sampling set of each flat component.
 double[] getValues(int s_index)
          get values for 'Flat' components in default range Unit-s
 byte[][] grabBytes()
           
 void setRangeErrors(ErrorEstimate[] errors)
          set ErrorEstimates associated with each RealType component of range
 void setSamples(double[][] range, boolean copy)
          set range array as range values of this FlatField; the array is dimensioned double[number_of_range_components][number_of_range_samples]; the order of range values must be the same as the order of domain indices in the DomainSet; copy array if copy flag is true
 void setSamples(double[][] range, ErrorEstimate[] errors, boolean copy)
          set the range values of the function including ErrorEstimate-s; the order of range values must be the same as the order of domain indices in the DomainSet
 void setSamples(float[][] range, boolean copy)
          set range array as range values of this FlatField; the array is dimensioned float[number_of_range_components][number_of_range_samples]; the order of range values must be the same as the order of domain indices in the DomainSet; copy array if copy flag is true
 void setSamples(float[][] range, ErrorEstimate[] errors, boolean copy)
          set the range values of the function including ErrorEstimate-s; the order of range values must be the same as the order of domain indices in the DomainSet
 void setSamples(int start, double[][] range)
           
 
Methods inherited from interface visad.Field
domainEnumeration, domainFactor, domainMultiply, domainMultiply, extract, getDefaultRangeUnits, getDomainSet, getFloats, getFloats, getLength, getRangeCoordinateSystem, getRangeCoordinateSystem, getRangeUnits, getSample, getStringValues, getValues, getValues, isFlatField, setSample, setSample, setSample, setSample, setSamples, setSamples, setSamples
 
Methods inherited from interface visad.Function
derivative, derivative, derivative, derivative, derivative, evaluate, evaluate, evaluate, evaluate, getDomainCoordinateSystem, getDomainDimension, getDomainUnits, resample, resample
 
Methods inherited from interface visad.Data
abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, adjustSamplingError, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, binary, binary, ceil, ceil, changeMathType, computeRanges, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, isMissing, local, log, log, longString, longString, max, max, min, min, multiply, multiply, negate, negate, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegrees, unary, unary
 
Methods inherited from interface visad.Thing
addReference, removeReference
 

Method Detail

getRangeSets

Set[] getRangeSets()
                   throws RemoteException,
                          VisADException
Returns the sampling set of each flat component.

Returns:
The sampling set of each component in the flat range.
Throws:
RemoteException
VisADException

getRangeErrors

ErrorEstimate[] getRangeErrors()
                               throws RemoteException,
                                      VisADException
return array of ErrorEstimates associated with each RealType component of range; each ErrorEstimate is a mean error for all samples of a range RealType component

Throws:
RemoteException
VisADException

setRangeErrors

void setRangeErrors(ErrorEstimate[] errors)
                    throws RemoteException,
                           VisADException
set ErrorEstimates associated with each RealType component of range

Throws:
RemoteException
VisADException

setSamples

void setSamples(double[][] range,
                boolean copy)
                throws RemoteException,
                       VisADException
set range array as range values of this FlatField; the array is dimensioned double[number_of_range_components][number_of_range_samples]; the order of range values must be the same as the order of domain indices in the DomainSet; copy array if copy flag is true

Throws:
RemoteException
VisADException

setSamples

void setSamples(float[][] range,
                boolean copy)
                throws RemoteException,
                       VisADException
set range array as range values of this FlatField; the array is dimensioned float[number_of_range_components][number_of_range_samples]; the order of range values must be the same as the order of domain indices in the DomainSet; copy array if copy flag is true

Throws:
RemoteException
VisADException

setSamples

void setSamples(double[][] range,
                ErrorEstimate[] errors,
                boolean copy)
                throws RemoteException,
                       VisADException
set the range values of the function including ErrorEstimate-s; the order of range values must be the same as the order of domain indices in the DomainSet

Throws:
RemoteException
VisADException

setSamples

void setSamples(int start,
                double[][] range)
                throws RemoteException,
                       VisADException
Throws:
RemoteException
VisADException

setSamples

void setSamples(float[][] range,
                ErrorEstimate[] errors,
                boolean copy)
                throws RemoteException,
                       VisADException
set the range values of the function including ErrorEstimate-s; the order of range values must be the same as the order of domain indices in the DomainSet

Throws:
RemoteException
VisADException

grabBytes

byte[][] grabBytes()
                   throws RemoteException,
                          VisADException
Throws:
RemoteException
VisADException

getValues

double[] getValues(int s_index)
                   throws RemoteException,
                          VisADException
get values for 'Flat' components in default range Unit-s

Throws:
RemoteException
VisADException

clearMissing

void clearMissing()
                  throws RemoteException,
                         VisADException
mark this FlatField as non-missing

Throws:
RemoteException
VisADException

convertToField

Field convertToField()
                     throws RemoteException,
                            VisADException
convert this FlatField to a (non-Flat) FieldImpl

Throws:
RemoteException
VisADException

getRangeDimension

int getRangeDimension()
                      throws RemoteException,
                             VisADException
Gets the number of components in the "flat" range.

Returns:
The number of components in the "flat" range.
Throws:
RemoteException
VisADException