specifying the z value on display

Hi all,
I'm having problems trying to use VisAD SpreadSheet to display the range that's mapped on to X and Y axis. I have the following mapping (longitude,latitude)->(temperature). When two buttons are pressed on the mouse a display comes up showing location of the longitude and latitude. What I would like to do is to display the data for temperature also. The SpreadSheet does this only when temperature is mapped to the Zaxis. As I am working in 2D, I only would like to map temperature to the IsoContour. I have tried searching this forum for clues as how I may do this and found some hints, but as I am not a very good programmer I would appreciate any help.

I found the following bit of information in this forum, but I have problems trying to use this in relation to the VisAD SpreadSheet.



To: John J Brecht <john.brecht@xxxxxxx>
Subject: Re: Transform of ViewPlatform, and Re: range value at cursor
From: "From: Bill Hibbard <hibbard@xxxxxxxxxxxxxxxxx>" <billh@xxxxxxxxxxxxx>
Date: Mon, 3 Jan 2000 18:28:29 -0600 (CST)
cc: VisAD List <visad-list@xxxxxxxxxxxxx>
In-Reply-To: <38711948.84C084D8@xxxxxxx>


What would be the most straightforward way to get the range value at a
cursor location?

Say for example the data is a FlatField with MathType ((x, y0 -> range)
and ScalarMaps are map_x: x -> XAxis and map_y: y -> YAxis.  Then:

 double[] scale_offset = new double[2];
 double[] dum_1 = new double[2];
 double[] dum_2 = new double[2];
 float[] cur = display.getDisplayRenderer().getCursor();
 map_x.getScale(scale_offset, dum_1, dum_2);
 double value_x = (cur[0] - scale_offset[1])/scale_offset[0];
 map_y.getScale(scale_offset, dum_1, dum_2);
 double value_y = (cur[1] - scale_offset[1])/scale_offset[0];
 RealTuple tuple
   new RealTuple(new Real[] {new Real(x, value_x),
                             new Real(y, value_y)});
 double range_value = ((Real) flat_field.evaluate(tuple)).getValue();




Thank you,
Jacky
p.s. I would like to thank Tom Whittaker for finding the Map of Europe
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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