Confusion with Tuples

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: