comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Extract Data from Point on Plot
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Extract Data from Point on Plot [message #64882] Thu, 29 January 2009 14:42 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
mrjejones@gmail.com writes:

> Just for more clarification, I am reading this information from a
> netCDF file into IDL and doing a "plots" to draw it over a map_set. I
> just want to give the coordinate in the PS (x,y coords) and get the
> lat, long, and albedo for that pixel.

This is pretty much what I do for a living these days,
although I have pretty much completely given up on
MAP_SET for much of anything. The secret is being
able to set up a coordinate system for a rectangular
area of the graphics display. This could be an image,
a line plot, a contour plot, etc. For a map coordinate
system, I use the MAPCOORD object in the Catalyst
Library. Normally, I use this in conjunction with
a ScaleImage object, which has a method (via the
CatImage object) to convert a location in the local (map)
coordinate system into a location in a pixel coordinate
system, so it can obtain the value of that pixel.

I don't expect you to dive into the Catalyst Library,
but you can see the guts of this system at work in
TVINFO, which works with TVIMAGE to allow you to click
on any displayed image and get the value of the image
at that location. (More or less, of course, since this
works no matter what resolution you are displaying your
image in.)

I should be charging you thousands of dollars for this
information, but I'll give it away to you for free, since
Matt Savoie spilled the beans to me and didn't charge me.
The real secret is using SCALE_VECTOR together with
VALUE_LOCATE to locate the correct pixel value. It is so
slick it is embarrassing to think it only took Matt and me
a combined 35 years to think of it. :-(

Here are some articles to read. They all use this idea:

http://www.dfanning.com/catalyst/imgwin.html
http://www.dfanning.com/catalyst/maponimage.html
http://www.dfanning.com/graphics_tips/tvinfo.html


Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Editing data in an existing HDF5 file and rewriting the fixed file, in IDL
Next Topic: Extract Data from Point on Plot

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 15:44:57 PDT 2025

Total time taken to generate the page: 1.60354 seconds