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?
> // 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