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

Home » Public Forums » archive » Data to Device coordinates in Objects
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Data to Device coordinates in Objects [message #54439] Mon, 18 June 2007 03:13 Go to next message
Gaurav is currently offline  Gaurav
Messages: 50
Registered: January 2007
Member
Hi Folks, I must be missing out something very fundamental-please bail
me out. What I want to do is to get the device coordinates of a
particular lat/lon value of a spherical object that is displayed in a
object window concocted out of a Draw Widget. None of the procedures
like COORD_CONV, CV_COORD etc. seem to be appropriate.

Cheers!
Re: Data to Device coordinates in Objects [message #54516 is a reply to message #54439] Tue, 19 June 2007 01:03 Go to previous message
Gaurav is currently offline  Gaurav
Messages: 50
Registered: January 2007
Member
Thanks for the reply Dr. Fanning, you wrote:
> I *really* don't want to get in the middle of this, but
> I presume you "data" coordinate system is some kind of
> map projection set up with the MAP_PROJ_** routines, right?
> So you can go back and forth between 3D and 2D coordinates
> fairly easily. Otherwise, I'm not sure you have a prayer.
> I know I wouldn't.

I don't know about being a better man, but things sure have turned out
in a way that I need to solve this thing.

No, I never used MAP_PROJ*** routines. I simply designed a spherical
'object' that I am trating as the Earth by warping a satellite image
of the Earth on it.

I am able to get the lat/lon of my current cursor position over the
globe by using the PICKDATA routine on the object window by using the
DEVICE COORDINATES as reference. This gives me my position in
RECTANGULAR coordinate system which I convert to spherical coordinates
using CV_COORD routine. Easy as that!

But the trouble is that there is no way to retrace these steps
backwards. I can use CV_COORD to get back to rectangular coordinates
but that only gives me corresponding coordinates for the spherical
model and I simply ahve no way of knowing as to where that pixel is
mapped in the DEVICE SPACE i.e. the DRAW WIDGET that I have used as my
object window. No, COORD_CONV does NOT work- for it is made only to
work in Direct Graphics.

Even a prayer does not appear to work. Help!
Re: Data to Device coordinates in Objects [message #54534 is a reply to message #54439] Mon, 18 June 2007 08:19 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gaurav writes:

> Hi Folks, I must be missing out something very fundamental-please bail
> me out. What I want to do is to get the device coordinates of a
> particular lat/lon value of a spherical object that is displayed in a
> object window concocted out of a Draw Widget. None of the procedures
> like COORD_CONV, CV_COORD etc. seem to be appropriate.

If spherical geometry seems "fundamental" to you, you
are a better man than I, my friend. :-)

I *really* don't want to get in the middle of this, but
I presume you "data" coordinate system is some kind of
map projection set up with the MAP_PROJ_** routines, right?
So you can go back and forth between 3D and 2D coordinates
fairly easily. Otherwise, I'm not sure you have a prayer.
I know I wouldn't.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: reading binary files
Next Topic: Intersection of ROIs

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

Current Time: Wed Oct 08 17:35:16 PDT 2025

Total time taken to generate the page: 0.00988 seconds