<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

Interpolation/

neighbor.pro

find the closetest point of (P0) within a list of np1 points P1 Which can be on a sphere

topneighbor Maps

result = neighbor(p0lon, p0lat, neighlon, neighlat, sphere=sphere, distance=distance, radians=radians)

Return value

index giving the P1[index] point that is the closetest point of (P0)

Parameters

p0lon        in required

scalar. longitudes of point P0.

p0lat        in required

scalar. latitudes of point P0.

neighlon       

neighlat       

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> Result = neighbor(lon0, lat0, lon1, lat1) IDL> print, neighbor(-105.15,40.02,[-0.07,100,50],[51.30,20,0], $ distance=dis) 0 IDL> print, dis 105.684 206.125 160.228

Version history

History

Sebastien Masson (smasson@lodyc.jussieu.fr) October 2003
Produced by IDLdoc 2.0.