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: Confusion with Tuples

Hi Cicero,

In addition to Steve's comments, I would add that when all
components of a TupleType (Tuple) are RealTypes (Reals)
then you should construct a RealTupleType (RealTuple).

Good luck,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html


On Tue, 29 Jan 2002, Cicero Augusto Wollmann [ISO-8859-1] Zandoná wrote:

> Hi, visad comunity
> 
> 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);
> 
> 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)
> 
> **The line "NomesCidades.java:86"  is: Tuple ss = new Tuple(simbolTuple, 
> sp);
> Any help would be appreciated. :-D
> 
> 


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