Unidata/IDV — pull request #9 by mhiley (2012-07-12 20:34:05+00:00)
Title: Fix for "Cursor/Data Readout" issue

Hi IDV team,

Occasionally when I use the "Cursor/Data Readout" feature (by clicking the middle mouse button) to interrogate individual pixel values, the readout only shows lat/lon values and fails to show the data values.

One easy way to reproduce this is to load a Level II radar reflectivity image (let's say KMKX) using a "Radar Sweep View in 2D" display. The data readout works fine for the radar projection but will fail when you change to certain projections (try "North America" or "US>CONUS", for example).

The cause of the problem seems to be when MapProjectionDisplay.getEarthLocation returns a longitude value outside of the range -180 to 180. My pull request is a simple modification to CursorReadoutWindow.java to ensure the longitude used to probe pixel values is always within the range -180 to 180. There might be other ways to attack the problem, but this has fixed all the cases I had been using to test the issue!

Thanks and let me know if I can provide any more info!
Mike Hiley
SSEC