Class TrackInfo

java.lang.Object
ucar.unidata.data.sounding.TrackInfo
Direct Known Subclasses:
CDMProfileFeatureTypeInfo, CdmTrackInfo, CDMTrajectoryFeatureTypeInfo, CosmicTrajectoryFeatureTypeInfo, EolDbTrackAdapter.EolDbTrackInfo

public abstract class TrackInfo extends Object
Class TrackInfo Provides access to a track or trajectory
Author:
IDV Development Team
  • Field Details

    • varTime

      protected String varTime
      The var time.
    • varLatitude

      protected String varLatitude
      The var latitude.
    • varLongitude

      protected String varLongitude
      The var longitude.
    • varAltitude

      protected String varAltitude
      The var altitude.
    • TIME_TYPE

      public static final String TIME_TYPE
      RealType name for time
      See Also:
    • LAT_TYPE

      public static final String LAT_TYPE
      RealType name for latitude
      See Also:
    • LON_TYPE

      public static final String LON_TYPE
      RealType name for longitude
      See Also:
    • ALT_TYPE

      public static final String ALT_TYPE
      RealType name for altitude
      See Also:
    • cachedTimeVals

      protected Hashtable cachedTimeVals
      cached time values
    • adapter

      protected TrackAdapter adapter
      The adapater
    • llaSet

      protected GriddedSet llaSet
      lat/lon/altitude set
    • lastSpatialSetRange

      protected ucar.ma2.Range lastSpatialSetRange
      The last range when we create the llaSet
    • variables

      protected List variables
      All the variables
    • trackName

      protected String trackName
      Name of track
  • Constructor Details

  • Method Details

    • addVariable

      protected void addVariable(VarInfo variable)
      Add variable test
      Parameters:
      variable - the variable
    • addVariableData

      protected void addVariableData(String vname, Object dataArray)
      Adds the variable data.
      Parameters:
      vname - the vname
      dataArray - the data array
    • getVariableData

      protected Object getVariableData(String vname)
      Gets the variable data.
      Parameters:
      vname - the vname
      Returns:
      the variable data
    • getVariables

      public List<VarInfo> getVariables()
      _more_
      Returns:
      _more_
    • 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
    • getNumberPoints

      public int getNumberPoints() throws Exception
      How many points in track
      Returns:
      num points in track
      Throws:
      Exception - _more_
    • makeEarthDomainSet

      protected GriddedSet makeEarthDomainSet(ucar.ma2.Range range) throws Exception
      Make the earth spatial domain
      Parameters:
      range - The data range of the request
      Returns:
      The spatial domain
      Throws:
      Exception - On badness
    • getTrackWithTime

      public FlatField getTrackWithTime(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:
      variable - variable to get
      range - The data range of the request
      Returns:
      FlatField of the type above.
      Throws:
      Exception - On badness
    • getTimeVals

      public double[] getTimeVals(ucar.ma2.Range range) throws Exception
      Get the time values for the range
      Parameters:
      range - range to use
      Returns:
      time values in range
      Throws:
      Exception - problem getting time values
    • getTimeUnit

      protected Unit getTimeUnit() throws Exception
      What is the time unit
      Returns:
      time unit
      Throws:
      Exception - On badness
    • getTime

      protected double[] getTime(ucar.ma2.Range range) throws Exception
      Get the time for each ob
      Parameters:
      range - subset on range
      Returns:
      time values
      Throws:
      Exception - On badness
    • getLatitude

      protected float[] getLatitude(ucar.ma2.Range range) throws Exception
      Get latitude values
      Parameters:
      range - subset on range. may be null
      Returns:
      latitude values
      Throws:
      Exception - On badness
    • getLongitude

      protected float[] getLongitude(ucar.ma2.Range range) throws Exception
      get longitude values
      Parameters:
      range - subset on range. may be null
      Returns:
      longitude values
      Throws:
      Exception - On badness
    • getAltitude

      protected float[] getAltitude(ucar.ma2.Range range) throws Exception
      get altitude values
      Parameters:
      range - subset on range. May be null
      Returns:
      altitude values
      Throws:
      Exception - On badness
    • getFloatData

      protected float[] getFloatData(ucar.ma2.Range range, VarInfo var) throws Exception
      Utility for getting data
      Parameters:
      range - The range
      var - The variable
      Returns:
      The data
      Throws:
      Exception - On badness
    • getStringData

      protected String[] getStringData(ucar.ma2.Range range, VarInfo var) throws Exception
      Get string values for variable
      Parameters:
      range - the range. May be null
      var - The var
      Returns:
      String values
      Throws:
      Exception - On badness
    • getFloatData

      protected abstract float[] getFloatData(ucar.ma2.Range range, String var) throws Exception
      Get the data values for range and var
      Parameters:
      range - The range. May be null.
      var - The variable
      Returns:
      Values
      Throws:
      Exception - On badness
    • getDoubleData

      protected double[] getDoubleData(ucar.ma2.Range range, String var) throws Exception
      _more_
      Parameters:
      range - _more_
      var - _more_
      Returns:
      _more_
      Throws:
      Exception - _more_
    • getStringData

      protected abstract String[] getStringData(ucar.ma2.Range range, String var) throws Exception
      Get string values
      Parameters:
      range - The range. May be null.
      var - The variable
      Returns:
      Values
      Throws:
      Exception - On badness
    • getPointObTrack

      public FieldImpl getPointObTrack(ucar.ma2.Range range) throws Exception
      Take a FlatField of data and turn it into a field of PointObs.
      Parameters:
      range - The data range of the request
      Returns:
      field of PointObs
      Throws:
      Exception - On badness
    • getDataVariable

      protected VarInfo getDataVariable(String variableName)
      Utility to find the variable with the given name
      Parameters:
      variableName - The name
      Returns:
      The variable.
    • getVarType

      protected RealType getVarType(RealType varToCheck)
      Get the appropriate RealType for the particular variable. Used to get alternate names for lat/lon/alt
      Parameters:
      varToCheck - variable to check
      Returns:
      new variable or the original
    • getTrackName

      public String getTrackName()
      Get the name of the track
      Returns:
      Track name
    • setCoordinateVars

      public void setCoordinateVars(String lon, String lat, String alt, String time)
      _more_
      Parameters:
      lon - _more_
      lat - _more_
      alt - _more_
      time - _more_
    • getVarType

      protected RealType getVarType(RealType varToCheck, Unit unit, double sampleValue)
      Get the appropriate RealType for the particular variable. Used to get alternate names for lat/lon/alt
      Parameters:
      varToCheck - variable to check
      unit - unit for return RealType
      sampleValue - sample value for comparing RealTypes
      Returns:
      new variable or the original
    • getDataRange

      protected ucar.ma2.Range getDataRange() throws Exception
      Get the default range of data
      Returns:
      range
      Throws:
      Exception - On badness
    • getFullRange

      protected ucar.ma2.Range getFullRange() throws Exception
      Get the full range but clipped to the adapters lastNMinutes
      Returns:
      range
      Throws:
      Exception - On badness
    • getVarsToUse

      protected List<VarInfo> getVarsToUse()
      Get list of VarInfos to use
      Returns:
      List of vars
    • countReals

      protected int countReals(List vars)
      How many of the given vars are numeric
      Parameters:
      vars - List of vars
      Returns:
      how many numeric
    • getTrack

      public FlatField getTrack(String variableName, ucar.ma2.Range range) throws Exception
      Returns a track for the variable name specified. Returned track is of type:
       ((Latitude, Longitude, Altitude) -> (variable)
       
      Parameters:
      variableName - variable of data
      range - The data range of the request
      Returns:
      FlatField of the type above.
      Throws:
      Exception - On badness
    • getSpatialSet

      protected GriddedSet getSpatialSet(ucar.ma2.Range range) throws Exception
      Returns the lat/lon/alt values as a GriddedSet with manifold dimension 1.
      Parameters:
      range - The data range of the request
      Returns:
      set of lat/lon/alt points.
      Throws:
      Exception - On badness
    • includeInPointData

      public boolean includeInPointData(String varName)
      Should we include the given var in the point data
      Parameters:
      varName - VarInfo name
      Returns:
      Include in point data
    • getAerologicalDiagramData

      public Data getAerologicalDiagramData() throws Exception
      get the data
      Returns:
      the data
      Throws:
      Exception - On badness
    • makeRAOB

      protected RAOB makeRAOB() throws Exception
      Make the RAOB
      Returns:
      The RAOB_
      Throws:
      Exception - On badness