Re: Map_Image and interpolation [message #18233 is a reply to message #18231] |
Wed, 08 December 1999 00:00   |
Ben Tupper
Messages: 186 Registered: August 1999
|
Senior Member |
|
|
In article <MPG.12b84831bc0510cf9899b9@news.frii.com>, davidf@dfanning.com
>
> P.S. I have a sneaking suspicion I have completely
> missed the point here. If so, I apologize profusely. :-)
>
Uhoh. You have said the very same thing to me before. Generally, as you have
learned recently, I often don't know my point either. I have to get out of this
pattern where the two of us have absolutely no idea what I'm talking about. I
remind myself of Admiral Stockwell (R.Perot's running mate) who started his
first debate against Al Gore and Dan Quayle with "Who am I? And why am I here?"
Admiral Stockwell is a very fine person... he didn't articulate well. So here's
another stab at my challenge.
I can indeed plot the ship locations on the warped grid correctly. No problem
with MAP_SET, MAP_IMAGE, PLOTS, etc. What I want to do is make a profile plot
of depth between consecutive ship locations. In order to do so, I MUST do
interpolation between two locations on the warped grid. Now a certain person
with an excellent IDL Tips Web site (think Canis latrans) has a page that
suggest something like the following for interpolating values off an image
(grid, ...)between points (x1,y1) and (x2,y2)
nPoints = Round(ABS(x2-x1+1) > ABS(y2-y1+1.))
xloc = X1 + (X2-X1) * Findgen(nPoints) / (nPoints - 1)
yloc = Y1 + (Y2-Y1) * Findgen(nPoints) / (nPoints - 1)
Z = Interpolate(WarpedGrid, xloc, yloc)
(or maybe I could do Z = WarpedGrid[xloc,yloc])
So, the question is... if I have a coordinate like (-68.503, 44.056), how do I
convert that into the appropriate subscript locations on the warped grid?
You might be wondering why the points must be interpolated from the warped image
and not the original... Well, the warped image has been flattened onto a 2d
surface while the original is for a sphere(its grid spacing is 0.0416667 arc
seconds.)
Thanks!
Ben
Ben Tupper
Pemaquid River Company
|
|
|