ucar.unidata.data.sounding
Class TrackAdapter

java.lang.Object
  extended by ucar.unidata.data.sounding.TrackAdapter
Direct Known Subclasses:
CdmTrackAdapter, EolDbTrackAdapter

public abstract class TrackAdapter
extends Object

Adapter for track type data. This could be a balloon sounding with spatial (lat/lon/alt) data for each time step, or an aircraft track.

Version:
$Revision: 1.65 $ $Date: 2007/04/16 20:34:57 $
Author:
IDV Development Team

Constructor Summary
TrackAdapter(TrackDataSource dataSource, String filename)
          Construct a new track from the filename
TrackAdapter(TrackDataSource dataSource, String filename, Hashtable pointDataFilter, int stride, int lastNMinutes)
          Construct a new track from the filename
 
Method Summary
protected  void addActions(List actions)
          _more_
protected  void addTrackInfo(TrackInfo trackInfo)
          Add the track info to the list
 Data getAerologicalDiagramData(String trackId)
          Get the track data parameters necessary to plot an aerological diagram.
 DateTime getBaseTime()
          Deprecated. use #getStartTime()
 String getDataSourceDescription()
          _more_
 String getDataSourceName()
          _more_
 DateTime getEndTime()
          Get the ending time of this track.
 String getFilename()
          Get the Filename property.
 int getLastNMinutes()
          Get the LastNMinutes property.
 ucar.ma2.Range getLastPointRange(String trackId)
          Get the data range for the very last obs
 int getNumObservations(String trackId)
          get total number of obs_
 FieldImpl getPointObTrack(String trackId, ucar.ma2.Range range)
          Take a FlatField of data and turn it into a field of PointObs.
 DateTime getStartTime()
          Get the starting time of this track.
 int getStride()
          Get the Stride property.
 FlatField getTrack(String trackId, String variable, ucar.ma2.Range range)
          Returns a track for the variable name specified.
 List getTrackInfos()
          Get list of TrackInfo-s
 FlatField getTrackWithTime(String trackId, String variable, ucar.ma2.Range range)
          Returns a track for the variable name specified.
 boolean includeInPointData(String varName)
          Should we include the given var in the point data
 void setLastNMinutes(int value)
          Set the LastNMinutes property.
 void setStride(int value)
          Set the Stride property.
 String toString()
          _more_
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TrackAdapter

public TrackAdapter(TrackDataSource dataSource,
                    String filename)
             throws Exception
Construct a new track from the filename

Parameters:
dataSource - _more_
filename - location of file
Throws:
Exception - On badness

TrackAdapter

public TrackAdapter(TrackDataSource dataSource,
                    String filename,
                    Hashtable pointDataFilter,
                    int stride,
                    int lastNMinutes)
             throws Exception
Construct a new track from the filename

Parameters:
dataSource - _more_
filename - location of file
pointDataFilter - Filters the variables to use
stride - The stride
lastNMinutes - use the last N minutes
Throws:
Exception - On badness
Method Detail

addActions

protected void addActions(List actions)
_more_

Parameters:
actions - _more_

addTrackInfo

protected void addTrackInfo(TrackInfo trackInfo)
                     throws Exception
Add the track info to the list

Parameters:
trackInfo - Describes a track
Throws:
Exception - On badness

getTrackInfos

public List getTrackInfos()
Get list of TrackInfo-s

Returns:
list of TrackInfo-s

getTrackWithTime

public FlatField getTrackWithTime(String trackId,
                                  String variable,
                                  ucar.ma2.Range range)
                           throws Exception
Returns a track for the variable name specified. Returned track is of type:
 ((Latitude, Longitude, Altitude) -> (variable, Time)
 

Parameters:
trackId - Which track
variable - variable to get
range - The data range of the request
Returns:
FlatField of the type above.
Throws:
Exception - On badness

getLastPointRange

public ucar.ma2.Range getLastPointRange(String trackId)
                                 throws Exception
Get the data range for the very last obs

Parameters:
trackId - which track
Returns:
The range
Throws:
Exception - On badness

getNumObservations

public int getNumObservations(String trackId)
                       throws Exception
get total number of obs_

Parameters:
trackId - Which track
Returns:
num of obs
Throws:
Exception - On badness

getPointObTrack

public FieldImpl getPointObTrack(String trackId,
                                 ucar.ma2.Range range)
                          throws Exception
Take a FlatField of data and turn it into a field of PointObs.

Parameters:
trackId - Which track
range - The data range of the request
Returns:
field of PointObs
Throws:
Exception - On badness

getTrack

public FlatField getTrack(String trackId,
                          String variable,
                          ucar.ma2.Range range)
                   throws Exception
Returns a track for the variable name specified. Returned track is of type:
 ((Latitude, Longitude, Altitude) -> (variable)
 

Parameters:
trackId - Which track
variable - variable of data
range - The data range of the request
Returns:
FlatField of the type above.
Throws:
Exception - On badness

getAerologicalDiagramData

public Data getAerologicalDiagramData(String trackId)
                               throws Exception
Get the track data parameters necessary to plot an aerological diagram. Returned data is of type:
     (Time -> (AirPressure,
                AirTemperature,
                Dewpoint,
                (Speed, Direction),
                (Latitude, Longitude, Altitude)))
 

Parameters:
trackId - id of the track
Returns:
Data object in the format above
Throws:
Exception - On badness

getBaseTime

public DateTime getBaseTime()
Deprecated. use #getStartTime()

Get the base (starting) time of this track.

Returns:
starting time

getStartTime

public DateTime getStartTime()
Get the starting time of this track.

Returns:
starting time

getEndTime

public DateTime getEndTime()
Get the ending time of this track.

Returns:
ending time

setStride

public void setStride(int value)
Set the Stride property.

Parameters:
value - The new value for Stride

getStride

public int getStride()
Get the Stride property.

Returns:
The Stride

setLastNMinutes

public void setLastNMinutes(int value)
Set the LastNMinutes property.

Parameters:
value - The new value for LastNMinutes

getLastNMinutes

public int getLastNMinutes()
Get the LastNMinutes property.

Returns:
The LastNMinutes

includeInPointData

public boolean includeInPointData(String varName)
Should we include the given var in the point data

Parameters:
varName - Variable name
Returns:
Include in point data

getFilename

public String getFilename()
Get the Filename property.

Returns:
The Filename

getDataSourceName

public String getDataSourceName()
_more_

Returns:
_more_

getDataSourceDescription

public String getDataSourceDescription()
_more_

Returns:
_more_

toString

public String toString()
_more_

Overrides:
toString in class Object
Returns:
_more_