FlatField.evaluate() returning missing

Gretings VisAD users,

I have some values stored in a FlatField and I use FlatField.evaluate()  to
retrive the values it contains, like this:

//Inside the displayChanged() method of a DisplayListener

VisADRay ray

float[] lon = lonMap.inverseScaleValues(new float[] {(float)
float[] lat = latMap.inverseScaleValues(new float[] {(float)

RealTuple tuple = new RealTuple(new Real[] {
            new Real(RealType.Longitude, lon[0]),
                    new Real(RealType.Latitude, lat[0])

double value = ((Real) vals_ff.evaluate(tuple)).getValue();


And this works fine for the first Field, but when I change the domain I have
to create another field, and then the evaluate() method starts to return
"missing" all the time. Here is the FlatField creation code:


//This if only is true in the first time a new domain is neded
if (domain_set==null || oldRange!=newRange){
            domain_set = new Gridded2DSet(domain_tuple,
createDomain(newRange), DIM, DIM);
            vals_ff = new FlatField( func_dom_pix, domain_set);

            if (radar_ref == null) {
                radar_ref = new DataReferenceImpl("radar_ref");

            radar_ref.setData( vals_ff );



I dont think the createDomain() method is really important, but I can send it
if you need. The worst thing is that the problem happens most of the time,
not everytime. I will try to make a sample to demonstrate in the meantime.
Cicero A. W. Zandoná


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