Interpolation/
neighbor.pro
find the closetest point of (P0) within a list of np1 points
P1 Which can be on a sphere
neighbor Maps
result = neighbor(p0lon, p0lat[, neighlon][, neighlat], sphere=sphere, distance=distance, radians=radians)
Return value
index giving the P1[index] point that is the closest point of (P0)
Parameters
p0lon
in
required
scalar. longitudes of point P0.
p0lat
in
required
scalar. latitudes of point P0.
neighlon
in
optional
neighlat
in
optional
Keywords
sphere
to activate if points are located on a sphere.
distance
dis, to get back the distances between P0 and the np1 points P1 in the
variable dis.
radians
if set, inputs and angular outputs are in radians, otherwise degrees.
Examples
IDL> print, neighbor(-105.15,40.02,[-0.07,100,50],[51.30,20,0], $
IDL> distance=dis)
0
IDL> print, dis
105.684 206.125 160.228
Version history
Version
$Id: neighbor.pro 136 2006-07-10 15:20:19Z pinsard $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
October 2003
Produced by IDLdoc 2.0 on Wed Sep 13 16:32:15 2006.