Re: [visad] Gridded2DSet Error

Hi devanshi...

Did you check this loop....



for ( j=0; j<yCoordinates; j++)
>>          {
>>               for ( i=0; i<xCoordinates; i++)
>>               {
>>                       samples[0][k] = (float) ((latarray[i]/100)-40);
>>                       samples[1][k] = (float)((lonarray[i]/100));
>>                        k++;
>>               }
>>          }

The issue is in this loop.

You are not using j variable in the loop.
For making indexes working you need to use j index.

The lat array index should be something like (j*xCoordinates+i).
I hope you understand.

I thought you might have corrected it.

regards
Ghansham



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