visad.Data
objects to model the different
types of data.
The VisAD data model was designed to support virtually any numerical
data. Rather than providing a variety of specific data structures like
images, grids and tables, the VisAD data model defines a set of classes
that can be used to build any hierarchical numerical data structures.
All these objects are defined in subclasses of visad.Data
and can be compared and manipulated without converting from one form
to another. This page is not meant to be a comprehensive overview
of the VisAD data model, but rather to show what Data
objects are used in the IDV. However, let's look at a good description
here.
For more detailed information on the VisAD Data model, see:
DataSource
class
returns a VisAD Data
object. This generalization allows
us to easily create new DataSources without having to cast the return
to a specific form. The basic task of a developer creating a new
DataSource is to transform the raw data into one of the known VisAD
Data forms that the IDV uses.
visad.FieldImpl
objects. A
grid can take the form of:
(x,y) -> (parm) (x,y) -> (parm1, ..., parmN) (x,y,z) -> (parm) (x,y,z) -> (parm1, ..., parmN) (t -> (x,y) -> (parm)) (t -> (x,y) -> (parm1, ..., parmN)) (t -> (x,y,z) -> (parm)) (t -> (x,y,z) -> (parm1, ..., parmN)) (t -> (index -> (x,y) -> (parm))) (t -> (index -> (x,y) -> (parm1, ..., parmN))) (t -> (index -> (x,y,z) -> (parm))) (t -> (index -> (x,y,z) -> (parm1, ..., parmN)))In general,
t
is a time variable, but it might also be
just an index. In the last 4 examples, index can be an index to a
set of radar rays for an RHI, or an ensemble index.
The ucar.unidata.data.grid.GridUtil
and
ucar.unidata.data.grid.GridMath
classes provide
utilities for slicing, dicing, querying and performing mathematical
operations on data that fits into these forms.
(x,y) -> (parm) (x,y) -> (parm1, ..., parmN) (t -> (x,y) -> (parm)) (t -> (x,y) -> (parm1, ..., parmN))
(x,y) -> (red, green, blue) (x,y) -> (red, green, blue, alpha) (t -> (x,y) -> (red, green, blue)) (t -> (x,y) -> (red, green, blue, alpha))
ucar.unidata.data.point.PointOb
structure which
has the methods:
/** * Get the location (lat/lon/alt) of the observation. * @return georeference location */ public EarthLocation getEarthLocation(); /** * Get the time of the observation. * @return time the observation was taken */ public DateTime getDateTime(); /** * Get the data associated with this observation. * @return observed data for this location and time. */ public Data getData();In the IDV, we use the
ucar.unidata.data.point.PointObTuple
to implement this interface as a visad.Tuple
.
visad.Text
object which
is basically a wrapper for a String.
visad.Gridded*DSet
where * is usually 2, but can be
3 if altitude is present. It has a 1D manifold in either case.
(Latitude, Longitude)
(Latitude, Longitude, Altitude)
(t -> (x,y,z) -> (parm))but wouldn't be thought of as a grid or image. However, using such a structure allows us to easily compare the values along an aircraft track with colocated points in a grid.
visad.CoordinateSystem
class to provide the necessary
transforms for geolocation. These provide on-the-fly coordinate
transforms.
visad.DateTime
class for time animation.
DateTime describes time values in seconds since some point. It provides
methods for formatting the values to timestamps and creating sets
from arrays of DateTime objects.