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: ShadowFunctionOrSetType

On Tue, 22 Jul 2003, Kam, Michelle C wrote:

> I'm referring to an example shown below from the url you suggested. But
> I'm wondering how to specify the Data object,
> "d:\\visad\\data\\tes5.csv", before calling getType() on it. I don't
> know of a Data constructor that can take in a string.

You have to have a Data object before calling getType(). You can
either construct the Data object, or read it from a file.

> Also, when I get
> the FunctionType and call getDomain() on the FunctionType, it returns a
> RealTupleType and I think TupleType.TupleComponents.length would then
> give me the number of input fields. Would that be one way to extract the
> number of input fields?

Yes.

>       // get the MathType of a Data object named 'vis5d'
>   FunctionType vis5d_type = (FunctionType) vis5d.getType();
>
>   // extract time, the domain of the FunctionType
>   RealType time = (RealType) vis5d_type.getDomain().getComponent(0);
>
> Also, if the exception was thrown because index was in the domain of the
> function and it was mapped to iso-contour, are there other fields in the
> Visad range that would produce the same error when index is mapped to
> it? What about other input fields in the domain besides index?

I think you'd get the same Exception with Flow, Text, Shape and
ShapeScale.

Good luck,
Bill


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