Re: Gridded3DSet.

Hi Carlos,

> Can somebody explain me how Gridded3DSet works?
> 
> Im working with an x, y and z coordinate, with a type like this:
>     (x, y, z) -> c
> I want the x to represent a utm coordinate form 428000 to 452000 with 24
> samples. The y will be another utm coordinate from 4463000 to 4487000
> with another 24 samples, and the z will represent different levels of
> height (15) but no a lineal series.
> 
> When i define my Gridded3DSet with this:
> 
>   public Gridded3DSet(MathType type, float[][] samples, int lengthX,
>                       int lengthY, int lengthZ) throws VisADException;
> 
> I know the values of lengthX (24), lenghtY (24), and lengthZ (15), but i
> dont know how to fill the samples array up.

If you have evenly spaced samples in each of your three
dimensions, then you can use a Linear3DSet with constructor:

  public Linear3DSet(MathType type, double first1, double last1, int length1,
                                    double first2, double last2, int length2,
                                    double first3, double last3, int length3)

Here length1 = 24, length2 = 24 and length3 = 15. The firstN and lastN
give the first and past sample values in each dimension.

You would use Gridded3DSet to define a Set of samples that were
not regularly spaced. For example, if you wanted to define the
sample locations of your UTM as (latitude, longitude, altitude)
locations. Then the 'float[3][24*24*15] samples' array would define
the locations of each sample.

Another approach is to define your RealTupleType for UTM
coordinates with a CoordinateSystem for the UTM transforms,
with reference (Longitude, Latitude, Altitude)
RealTupleType.SpatialEarth3DTuple.

I don't know if VisAD includes a system intrinsic CoordinateSystem
for UTM. The visad.data.mcidas.AREACoordinateSystem class appears
to be able to use edu.wisc.ssec.mcidas.MERCnav class (which is
probably a Mercator CoordinateSystem), but I don;t know if you can
use it independent of a McIDAS area file. Maybe one of the other
developers knows of a convenient Mercator CoordinateSystem in VisAD.

If not, you can always just use a Linear3DSet or Gridded3DSet as
I described earlier.

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html