Re: Displayed Data

Hi Kevin,

> If/when I zoom in on my displayed data, can I obtain the max and min
> values of the data that are being displayed.
>
> For example, let's sat that I have
>
> (latitude, longitude)->(altitude)
>
> projected in 2D with altitude is depicted as RGB.  If I zoom in
> (shift+left click), am I able to get the "ranges" of the visible domain
> values?  I.e.
>
> x1 < lat < y1
> x2 < lon < y2
>
> I thought that I could do this with the DataRenderer getRanges()
> method.  Would this be correct?  If so, is there a way to get the
> default DataRender from the DisplayImpl, or do I created one and add it
> to the Display?

I doubt you can rely on DataRenderer.getRanges() - it is
used for flow rendering and may not give reliable results
when you call it (e.g., when there is no flow rendering).

What you want to do is pretty complex. I'd call
MouseBehavior.findRay(int screen_x, int screen_y) (using
the MouseBehaviorJ3D of your Display) for the four corners
of your screen, intersect the rays with the plain where
your data lie (usually z = 0), then unmap the x and y
coordinates of the intersection through your spatial
ScalarMaps. That can give the lat and lon bounds. From
there you can find Field ranges.

Good luck,
Bill


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