NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: UnionSet and Animation

Hi,
> Don't construct a FlatField. Just the FieldImpl, then put
> your Gridded3DSets into it one at a time via the setSample()
> method of FieldIMpl.
I tried this with the following line of code:
sequence.setSample(0,gsp[0]);

But I get the error:
Exception in thread "main" visad.TypeException: FieldImpl.setSample: bad
range type
        at visad.FieldImpl.setSample(FieldImpl.java:617)

Other related code:
  RealType[] time = {RealType.Time};
 RealTupleType time_type = new RealTupleType(time);
 RealTupleType xyz = new RealTupleType(x, y, z);
 Gridded3DSet[] gsp = new Gridded3DSet[1];
 FunctionType time_samples = new FunctionType(time_type,xyz);
  DateTime base = new DateTime(1999, 122, 57060);
 double start = base.getValue();
 Set time_set = new Linear1DSet(time_type, start, start + 1.0, ntimes1);
 FieldImpl sequence = new FieldImpl(time_samples, time_set);

Have I made a mistake in creating the FieldImpl? My mathtype should be
(time->Set(x,y,z))

Thanks,
Jay


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: