Re: Map_Image and interpolation [message #18218 is a reply to message #18215] |
Thu, 09 December 1999 00:00   |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Ben Tupper (Ben_member@newsguy.com) writes:
> Actually, I think Ray's algorithm should work fine... if I can get a handle on
> how the warped image is georeferenced.
You don't know my teenage son, do you? Something about
the head-knocking tone of this conversation reminds me
of him. :-)
> When I interpolate off the unwarped image I don't get the right answer because I
> am assuming that the unwarped image pixel locations are all the same physical
> size everywhere.
What do you mean by you "don't get the right
answer". Why do you think the answer isn't right?
Any chance we could see a code fragment?
> But of course, they are not... because the east-west length of
> an arc second decreases as you move poleward (lines of longitude converge.) So
> if I try to calculate the distance between two points assuming a regular grid
> cell size, then I get the wrong distance (and if I interpolate or sample the
> grid at arbitrary locations between two points... I'll sample the wrong pixels.)
Why are we calculating the distance now? I thought we were
trying to create a depth profile. Sigh...
Remind me again what we are trying to do here. I thought
we were trying to find the depth profile of the ocean
between two known ship locations. If you want to know
the distance between those two ships, I can provide you
will a great circle algorithm given to me by David Stern
himself, as a peace offering after a particularly
spirited exchange of ideas on something or other I
said about map projections in this newsgroup. :-)
> Here's a thought; suppose I wanted to make the mapped image program interactive.
> I want to post the lon/lat value of the cursor into two FSC_INPUTFIELD widgets.
> How do I convert the cursor position into lon/lat using direct graphics?
Assuming you have this is a draw widget and you
have kept the !Map, !X, !Y, and !P system variables
around when you created the map projection, then you
simply convert the XY device locations to data coordinates!
This is *exactly* my point. Map_Set should be doing
*all* of the work for you.
Cheers,
David
P.S. Oh, where's my wife!? She can explain this better
than I can. :-(
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|