Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi Bill, I wanted to construct a Data object without having to load it into the spreadsheet cell if possible. You said you can read it in from a file. What class provides such a method? Tom, I was actually wondering if it was possible to extract the range value for the "index" input field. ie. I'm trying to see if the input "index" is mapped to the Visad parameter "iso-contour". I don't think I can just access the value of the first spot in an array of the types since index seems to occur in different places in the domain (and is listed in a different order on the left column of the mapping dialog box) for each csv file I've tried. Do you know if there is a way to see what value "index" was mapped to? Thanks, -----Original Message----- From: Bill Hibbard [mailto:billh@xxxxxxxxxxxxx] Sent: Tuesday, July 22, 2003 12:07 PM To: User Subject: RE: ShadowFunctionOrSetType On Tue, 22 Jul 2003, User 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
visad
archives: