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

Home » Public Forums » archive » Re: data interpolation
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: data interpolation [message #18689] Thu, 03 February 2000 00:00
T Bowers is currently offline  T Bowers
Messages: 56
Registered: May 1998
Member
Hi Dave,
See IDL's triangulate procedure and trigrid function. use 'em kinda like
this:

put your x coordinates (longitude?) in a variable, e.g. xData
put your y coordinates (latitude?) in a variable, e.g. yData
put your data values (population, etc.?) in a variable, e.g. zData
then do...

;//Create a mesh to interpolate to...
triangulate, xData, yData, angles, b

;//Use IDL's interpolation function, trigrid
minX = min(xData, max=maxX, /NaN) & minY = min(yData, max=maxY, /NaN)
limits = [minX, minY, maxX, maxY]
zGrid = trigrid(xData, yData, zData, angles, [0,0], limits, $
XGRID=xGrid, YGRID=yGrid, MISSING=!Values.F_NaN)

;//Now you have gridded data, so see what it looks like...
surface, zGrid, xGrid, yGrid

good luck,
todd

"David Miller" <millerdo@erols.com> wrote in message
news:87a3de$i3g$1@bob.news.rcn.net...
> I have three data points (corresponding to three cities). I want to find
the
> interpolated value at a point within the triangle defined by the three
> cities. Is there an interpolation routine built into IDL for this task?
>
> Thanks,
> Dave
>
>
> --
> David O. Miller
> SSAI - NASA/Goddard Space Flight Center
>
>
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: archive?
Next Topic: What's new

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

Current Time: Sat Oct 11 11:50:27 PDT 2025

Total time taken to generate the page: 0.79862 seconds