Package ucar.unidata.data.sounding
Class TrackAdapter
java.lang.Object
ucar.unidata.data.sounding.TrackAdapter
- Direct Known Subclasses:
CdmTrackAdapter
,EolDbTrackAdapter
,TrajectoryFeatureTypeAdapter
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 Summary
ConstructorsConstructorDescriptionTrackAdapter
(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
Modifier and TypeMethodDescriptionprotected void
addActions
(List actions) Adds the actions.protected void
addTrackInfo
(TrackInfo trackInfo) Add the track info to the list.getAerologicalDiagramData
(String trackId) Get the track data parameters necessary to plot an aerological diagram.Get the base (starting) time of this track.Gets the data source description.Gets the data source name.Get the ending time of this track.Get the Filename property.int
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_.getPointObTrack
(String trackId, ucar.ma2.Range range) Take a FlatField of data and turn it into a field of PointObs.Get the starting time of this track.int
Get the Stride property.Returns a track for the variable name specified.getTrackInfo
(String name) Find the track info with the given name.Get list of TrackInfo-s.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.toString()
-
Constructor Details
-
TrackAdapter
- Throws:
Exception
-
TrackAdapter
Construct a new track from the filename.- Parameters:
dataSource
- datasourcefilename
- 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 filepointDataFilter
- Filters the variables to usestride
- The stridelastNMinutes
- use the last N minutes- Throws:
Exception
- On badness
-
-
Method Details
-
addActions
Adds the actions.- Parameters:
actions
- the actions
-
addTrackInfo
Add the track info to the list.- Parameters:
trackInfo
- Describes a track- Throws:
Exception
- On badness
-
getTrackInfos
Get list of TrackInfo-s.- Returns:
- list of TrackInfo-s
-
getTrackInfo
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 trackvariable
- variable to getrange
- The data range of the request- Returns:
- FlatField of the type above.
- Throws:
Exception
- On badness
-
getLastPointRange
Get the data range for the very last obs.- Parameters:
trackId
- which track- Returns:
- The range
- Throws:
Exception
- On badness
-
getNumObservations
get total number of obs_.- Parameters:
trackId
- Which track- Returns:
- num of obs
- Throws:
Exception
- On badness
-
getPointObTrack
Take a FlatField of data and turn it into a field of PointObs.- Parameters:
trackId
- Which trackrange
- The data range of the request- Returns:
- field of PointObs
- Throws:
Exception
- On badness
-
getTrack
Returns a track for the variable name specified. Returned track is of type:((Latitude, Longitude, Altitude) -> (variable)
- Parameters:
trackId
- Which trackvariable
- variable of datarange
- The data range of the request- Returns:
- FlatField of the type above.
- Throws:
Exception
- On badness
-
getAerologicalDiagramData
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
Get the base (starting) time of this track.- Returns:
- starting time deprecated use #getStartTime()
-
getStartTime
Get the starting time of this track.- Returns:
- starting time
-
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
Should we include the given var in the point data.- Parameters:
varName
- Variable name- Returns:
- Include in point data
-
getFilename
Get the Filename property.- Returns:
- The Filename
-
getDataSourceName
Gets the data source name.- Returns:
- the data source name
-
getDataSourceDescription
Gets the data source description.- Returns:
- the data source description
-
toString
-