Unidata / IDV

The Integrated Data Viewer (IDV) from Unidata is a framework for analyzing and displaying geoscience data.
http://www.unidata.ucar.edu/software/idv/
Other
80 stars 37 forks source link

Fix for "Cursor/Data Readout" issue #9

Closed mhiley closed 12 years ago

mhiley commented 12 years ago

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

mhiley commented 12 years ago

Also, just to clarify: this is the only relevant commit in my pull request. The rest are just merging changes from the Unidata repo (I should have made a branch just for this pull request...)

julienchastang commented 12 years ago

OK Thanks. We will take a closer look next week. We are busy attending the Unidata workshop.

julienchastang commented 12 years ago

Hi again Mike.

The fix looks pretty straightforward, but before we merge it in, we need to clean up the git history (to get rid of those merge commits). What I would suggest is make sure your IDV master is up-to-date (re-clone, if necessary). Then create a patch branch off of that new master with your fix and resubmit that as a pull request. If this is all too much trouble, I can do it for you (but you will lose authorship of the relevant commit).

mhiley commented 12 years ago

I created a new pull request that should take care of this: https://github.com/Unidata/IDV/pull/11

Thanks! Mike

julienchastang commented 12 years ago

Resolved.