Re: data interpolation [message #18689] |
Thu, 03 February 2000 00:00 |
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
>
>
>
|
|
|