ucar.nc2.dt
Interface TrajectoryObsDatatype


public interface TrajectoryObsDatatype

A sequence (one-dimensional, variable-length list) of PointObsDatatype, connected in space and time. The observations are ordered in time (in other words, the time dimension must increase monotonically along the trajectory).

Author:
caron

Method Summary
 LatLonRect getBoundingBox()
          BoundingBox for the trajectory.
 StructureData getData(int point)
          Get values for all parameters (except time, lat, lon, and elev) at the requested trajectory point.
 Array getData(int point, java.lang.String parameterName)
           
 Array getData(Range range, java.lang.String parameterName)
          Get the values of the requested parameter on the given Range of the trajectory.
 DataIterator getDataIterator(int bufferSize)
          Get an efficient iterator over all the data in the Trajectory in time order.
 VariableSimpleIF getDataVariable(java.lang.String name)
          Get the named data Variable.
 java.util.List getDataVariables()
          Return a list of the data Variables available in this dataset.
 java.lang.String getDescription()
          A description of the trajectory.
 double getElevation(int point)
          Return the elevation at the requested trajectory point in units of meters, missing values = NaN.
 Array getElevation(Range range)
          Get the elevation values on the given Range of the trajectory.
 java.util.Date getEndDate()
          End date for the trajectory.
 Range getFullRange()
          Get the range for the entire trajectory.
 java.lang.String getId()
          The ID of the trajectory, may not be null.
 double getLatitude(int point)
          Return the latitude at the requested trajectory point in units of "degrees_north".
 Array getLatitude(Range range)
          Get the latitude values on the given Range of the trajectory.
 EarthLocation getLocation(int point)
          Return the location for the given point.
 double getLongitude(int point)
          Return the longitude at the requested trajectory point in units of "degrees_east".
 Array getLongitude(Range range)
          Get the longitude values on the given Range of the trajectory.
 int getNumberPoints()
          The number of points along the trajectory.
 PointObsDatatype getPointObsData(int point)
          Get a PointObsDatatype for the requested trajectory point.
 Range getPointRange(int point)
          Get a range for a single point in the trajectory.
 Range getRange(int start, int end, int stride)
          Get a range with the given start, end, and stride in the trajectory.
 java.util.Date getStartDate()
          Start date for the trajectory.
 java.util.Date getTime(int point)
          Return the time for the given point as a java.util.Date.
 Array getTime(Range range)
          Get the time values on the given Range of the trajectory.
 java.lang.String getTimeUnitsIdentifier()
          Return the String representation of the units for time.
 double getTimeValue(int point)
          Return the time for the given point as a double in the units given by getTimeUnitsIdentifier().
 

Method Detail

getId

java.lang.String getId()
The ID of the trajectory, may not be null.


getDescription

java.lang.String getDescription()
A description of the trajectory.


getNumberPoints

int getNumberPoints()
The number of points along the trajectory.


getDataVariables

java.util.List getDataVariables()
Return a list of the data Variables available in this dataset. The list contains only "data variables of interest", not metadata or coordinate system variables, etc.

Returns:
List of type TypedDataVariable

getDataVariable

VariableSimpleIF getDataVariable(java.lang.String name)
Get the named data Variable.

Parameters:
name - of data Variable.
Returns:
TypedDataVariable or null.

getPointObsData

PointObsDatatype getPointObsData(int point)
                                 throws java.io.IOException
Get a PointObsDatatype for the requested trajectory point.

Parameters:
point - the point along the trajectory
Returns:
corresponding PointObsDatatype
Throws:
java.io.IOException

getStartDate

java.util.Date getStartDate()
Start date for the trajectory.


getEndDate

java.util.Date getEndDate()
End date for the trajectory.


getBoundingBox

LatLonRect getBoundingBox()
BoundingBox for the trajectory. May not be available.


getTime

java.util.Date getTime(int point)
                       throws java.io.IOException
Return the time for the given point as a java.util.Date.

Throws:
java.io.IOException

getLocation

EarthLocation getLocation(int point)
                          throws java.io.IOException
Return the location for the given point.

Throws:
java.io.IOException

getTimeValue

double getTimeValue(int point)
                    throws java.io.IOException
Return the time for the given point as a double in the units given by getTimeUnitsIdentifier().

Throws:
java.io.IOException

getTimeUnitsIdentifier

java.lang.String getTimeUnitsIdentifier()
Return the String representation of the units for time.


getLatitude

double getLatitude(int point)
                   throws java.io.IOException
Return the latitude at the requested trajectory point in units of "degrees_north".

Throws:
java.io.IOException

getLongitude

double getLongitude(int point)
                    throws java.io.IOException
Return the longitude at the requested trajectory point in units of "degrees_east".

Throws:
java.io.IOException

getElevation

double getElevation(int point)
                    throws java.io.IOException
Return the elevation at the requested trajectory point in units of meters, missing values = NaN.

Throws:
java.io.IOException

getData

StructureData getData(int point)
                      throws java.io.IOException,
                             InvalidRangeException
Get values for all parameters (except time, lat, lon, and elev) at the requested trajectory point. Units are as given by getXXUnitsIdentifier() methods.

Parameters:
point - the index point into the trajectory
Returns:
ucar.nc2.StructureData containing an Array for each parameter.
Throws:
java.io.IOException - if problems reading data.
InvalidRangeException

getData

Array getData(int point,
              java.lang.String parameterName)
              throws java.io.IOException
Throws:
java.io.IOException

getDataIterator

DataIterator getDataIterator(int bufferSize)
                             throws java.io.IOException
Get an efficient iterator over all the data in the Trajectory in time order. This is an optional method; it will return null if no iterator is available. This is the efficient way to get all the data, it can be 100 times faster than getData(). This will return an iterator over type getDataClass(), and the actual data has already been read into memory, that is, dataType.getData() will not incur any I/O.

This is accomplished by buffering bufferSize amount of data at once. You must fully process the data, or copy it out of the StructureData, as you iterate over it, in order for the garbage collector to work.

We dont need a cancelTask, just stop the iteration if the user want to cancel.

Parameters:
bufferSize - if > 0, the internal buffer size, else use the default. Typically 100k - 1M for best results.
Returns:
Iterator over type PointObsDatatype, time order; or null if not available.
Throws:
java.io.IOException

getFullRange

Range getFullRange()
Get the range for the entire trajectory.


getPointRange

Range getPointRange(int point)
                    throws InvalidRangeException
Get a range for a single point in the trajectory.

Throws:
InvalidRangeException

getRange

Range getRange(int start,
               int end,
               int stride)
               throws InvalidRangeException
Get a range with the given start, end, and stride in the trajectory.

Throws:
InvalidRangeException

getTime

Array getTime(Range range)
              throws java.io.IOException,
                     InvalidRangeException
Get the time values on the given Range of the trajectory.

Throws:
java.io.IOException
InvalidRangeException

getLatitude

Array getLatitude(Range range)
                  throws java.io.IOException,
                         InvalidRangeException
Get the latitude values on the given Range of the trajectory.

Throws:
java.io.IOException
InvalidRangeException

getLongitude

Array getLongitude(Range range)
                   throws java.io.IOException,
                          InvalidRangeException
Get the longitude values on the given Range of the trajectory.

Throws:
java.io.IOException
InvalidRangeException

getElevation

Array getElevation(Range range)
                   throws java.io.IOException,
                          InvalidRangeException
Get the elevation values on the given Range of the trajectory.

Throws:
java.io.IOException
InvalidRangeException

getData

Array getData(Range range,
              java.lang.String parameterName)
              throws java.io.IOException,
                     InvalidRangeException
Get the values of the requested parameter on the given Range of the trajectory.

Throws:
java.io.IOException
InvalidRangeException