Class TrackAdapter

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

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.
Author:
IDV Development Team
  • Constructor Details

    • TrackAdapter

      public TrackAdapter() throws Exception
      Throws:
      Exception
    • TrackAdapter

      public TrackAdapter(TrackDataSource dataSource, String filename) throws Exception
      Construct a new track from the filename.
      Parameters:
      dataSource - datasource
      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 Details

    • addActions

      protected void addActions(List actions)
      Adds the actions.
      Parameters:
      actions - the actions
    • 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<TrackInfo> getTrackInfos()
      Get list of TrackInfo-s.
      Returns:
      list of TrackInfo-s
    • getTrackInfo

      public TrackInfo getTrackInfo(String name)
      Find the track info with the given name.
      Parameters:
      name - name of track info
      Returns:
      the track info or null if not found
    • 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()
      Get the base (starting) time of this track.
      Returns:
      starting time deprecated use #getStartTime()
    • 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()
      Gets the data source name.
      Returns:
      the data source name
    • getDataSourceDescription

      public String getDataSourceDescription()
      Gets the data source description.
      Returns:
      the data source description
    • toString

      public String toString()
      Overrides:
      toString in class Object