topMap_npoints Maps
Return value
An (np0,np1) array giving the distance in meter between np0
points P0 and np1 points P1. Element (i,j) of the ouput is the
distance between element P0[i] and P1[j].
If keyword /TWO_BY_TWO is given then Map_nPoints returns
an np-element vector giving the distance in meter between P0[i]
and P1[i] (in that case, we have np0 = np1 = np)
if /MIDDLE see this keyword.
Parameters
lon0
in
required
lat0
lon1
in
required
lat1
Keywords
azimuth
RADIANS
RADIUS
MIDDLE
TWO_BY_TWO
Examples
Result = Map_nPoints(lon0, lat0, lon1, lat1)
IDL> print, $
map_npoints([-105.15,1],[40.02,1],[-0.07,100,50],[51.30,20,0])
7551369.3 5600334.8
12864354. 10921254.
14919237. 5455558.8
IDL> lon0 = [-10, 20, 100]
IDL> lat0 = [0, -10, 45]
IDL> lon1 = [10, 60, 280]
IDL> lat1 = [0, 10, 45]
IDL> dist = map_npoints(lon0, lat0, lon1, lat1, azimuth = azi)
IDL> help, dist, azi
DIST DOUBLE = Array[3, 3]
AZI DOUBLE = Array[3, 3]
IDL> print, dist[4*lindgen(3)], azi[4*lindgen(3)]
2226414.0 4957944.5 10018863.
90.000000 64.494450 4.9615627e-15
IDL> dist = map_npoints(lon0, lat0, lon1, lat1, azimuth = azi, /two_by_two)
IDL> help, dist, azi
DIST DOUBLE = Array[3]
AZI DOUBLE = Array[3]
IDL> print, dist, azi
2226414.0 4957944.5 10018863.
90.000000 64.494450 4.9615627e-15
IDL> print, map_2points(lon0[0], lat0[0], lon1[0], lat1[0])
20.000000 90.000000
IDL> print, map_npoints(lon0[0], lat0[0], lon1[0], lat1[0], azi=azi)/6378206.4d0 / !dtor, azi
20.000000
90.000000
IDL> lon0 = [-10, 20, 100]
IDL> lat0 = [0, -10, 45]
IDL> lon1 = [10, 60, 280]
IDL> lat1 = [0, 10, 45]
IDL> mid = map_npoints(lon0, lat0, lon1, lat1, /middle, /two_by_two)
IDL> print, reform(mid[0,*]), reform(mid[1,*])
0.0000000 40.000000 190.00000
0.0000000 -1.5902773e-15 90.000000
IDL> print, (map_2points(lon0[0], lat0[0], lon1[0], lat1[0], npath = 3))[*, 1]
0.0000000 0.0000000
IDL> print, (map_2points(lon0[1], lat0[1], lon1[1], lat1[1], npath = 3))[*, 1]
40.000000 -1.5902773e-15
IDL> print, (map_2points(lon0[2], lat0[2], lon1[2], lat1[2], npath = 3))[*, 1]
190.00000 90.000000
Version history
History
Based on the IDL function map_2points.pro,v 1.6 2001/01/15
Sebastien Masson (smasson@lodyc.jussieu.fr)
October 2003