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

Home » Public Forums » archive » Re: Congrid but with shift of origin
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
Re: Congrid but with shift of origin [message #24569] Wed, 04 April 2001 14:41
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Joe Means <joe.means@orst.edu> writes:

> Hello group,
> I need idl code to resample an array that is a digital terrain model
> and often need the origin to be shifted by fractions of a cell in x and
> y directions. Congrid cannot handle the latter, as I read the
> documentation. I'll bet someone has a program that does this. Can some
> one point me to such help.

You probably want the INTERPOLATE function. After all, that's what
CONGRID uses. INTERPOLATE may sound complicated from the
documentation, but it's not really.

All you have to do is rescale your resampled x and y coordinates to be
pixel values, which can be fractional. INTERPOLATE considers the
image measurement to occur at the *left* edge of the pixel, but this
only important if you use the MISSING keyword.

The only other important thing is for you to remember to use the GRID
keyword which will make INTERPOLATE construct a grid of interpolates
rather than a 1-d slice.

Good luck,
Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Congrid but with shift of origin
Next Topic: Re: Google Stiffling Free Flow of Jokes

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

Current Time: Wed Oct 08 11:45:06 PDT 2025

Total time taken to generate the page: 0.00537 seconds