Re: Confusion with Tuples

Cicero,

>Date: Tue, 29 Jan 2002 19:33:38 -0200
>From: Cicero Augusto Wollmann =?ISO-8859-1?Q?Zandon=E1?= <cicero@xxxxxxxxxx>
>Organization: UCAR/Unidata
>To: visad-list@xxxxxxxxxxxxx
>Subject: Confusion with Tuples

The above message contained the following:

> I´m tring to drawn some shapes and made a TupleType like this:
> 
>             visad.RealType count = new RealType("count", null, null);
>             MathType[] simbolType = new MathType[] {RealType.Latitude, 
> RealType.Longitude, count};
>             TupleType simbolTuple = new TupleType(mtypes);

"mtypes" is undefined in the above.

> But when I try to make a Tuple whith it:
> 
>             DataReferenceImpl refSimbol = new 
> DataReferenceImpl("refSimbol");
>             FieldImpl simbolField = new FieldImpl(simbolFunction, shapeSet);
>             Data[] sp = new Data[] {new Real(RealType.Latitude, -50.0),
>                                new Real(RealType.Longitude, -25.0),
>                                new Real(count, 1.0)};
>             Tuple ss = new Tuple(simbolTuple, sp);
>             simbolField.setSample(0, ss);
>             refSimbol.setData(simbolField);
>             display.addReference(refSimbol);
> 
> I recive the message:
>         visad.TypeException: Tuple: type does not match data
>         at visad.Tuple.<init>(Tuple.java:60)
>         at visad.Tuple.<init>(Tuple.java:52)
>         at br.simepar.apps.jvisrad.NomesCidades.<init>(NomesCidades.java:86)
>         at br.simepar.apps.jvisrad.JVisRad.<init>(JVisRad.java:125)
>         at br.simepar.apps.jvisrad.Principal.<init>(Principal.java:40)
>         at br.simepar.apps.jvisrad.Principal.main(Principal.java:376)

It looks like the components of "simbolTuple" don't correspond to the
components of "sp".  What is "mtypes"?

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>