source: trunk/SRC/ToBeReviewed/TRIANGULATION/drawcoast_e.pro @ 226

Last change on this file since 226 was 226, checked in by pinsard, 17 years ago

corrections of some misspellings in some *.pro

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
RevLine 
[150]1;+
2; @file_comments
3;
4;
5; @categories
6;
[226]7;
[150]8; @param MASK
9;
[226]10;
[150]11; @param XF
12;
[226]13;
[150]14; @param YF
15;
[226]16;
[150]17; @param NX
18;
[226]19;
[150]20; @param NY
21;
[226]22;
[163]23; @keyword COAST_COLOR {default=0}
[150]24; The color of the coastline.
[163]25; Default is black (0).
[150]26;
[163]27; @keyword COAST_THICK {default=1}
[150]28; The thick of the trait to trace continents
29;
[163]30; @keyword XSEUIL {default=5}
[226]31; To eliminate segments of coasts which are to big (which link points which can
32; be close on the sphere but distant on the drawing). We delete all segments
[163]33; whose the size surpass the size of the window following X/XSEUIL.
[226]34; But it can be to big if we do a big zoom or a little one for some
[150]35; projections... We specify it the keyword thanks to this keyword!
36;
37; @keyword YSEUIL
38; See XSEUIL
39;
40; @keyword _EXTRA
41; Used to pass our keywords
[226]42;
[150]43; @returns
[226]44;
45;
[150]46; @uses
[226]47;
48;
[150]49; @restrictions
[226]50;
51;
[150]52; @examples
[226]53;
54;
[150]55; @history
56;
[226]57;
58; @version
59;
[150]60; @todo
61; Seb: remplir le header
[226]62;
[150]63;-
64
[29]65PRO drawcoast_e, mask, xf, yf, nx, ny, COAST_COLOR = coast_color, COAST_THICK = coast_thick, YSEUIL = yseuil, XSEUIL = xseuil, onemore = onemore, _extra = ex
66;---------------------------------------------------------
[114]67;
68  compile_opt idl2, strictarrsubs
69;
[29]70@cm_4mesh
71  IF NOT keyword_set(key_forgetold) THEN BEGIN
72@updatenew
73@updatekwd
74  ENDIF
75;---------------------------------------------------------
[2]76   tempsun = systime(1)         ; pour key_performance
77;---------------------------------------------------------
[29]78   if keyword_set(key_periodic) AND nx EQ jpi then begin
[2]79      mask = [mask, mask[0, *]]
80      xf = [xf, xf[0, *]]
81      yf = [yf, yf[0, *]]
82      nx = nx+1
83   ENDIF
84;
85; we plot the borders of the diamond in this sense : \
86;
87   if NOT keyword_set(onemore) then onemore = 0
[29]88   if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2)
[2]89   distanceseuil = (!p.position[2]-!p.position[0])/xseuil
[226]90; liste: liste des points i pour lesquels on va tracer un segment
[2]91   index = lindgen(nx, ny)
92   index = index[0:nx-2, 1:ny-1]
93   indexbis = index-nx+((index/nx+onemore) MOD 2)
94   liste = where(mask[index+1]+mask[indexbis] EQ 1 $
[29]95                 AND (xf[index]-xf[indexbis])^2+(yf[index]-yf[indexbis])^2 LE distanceseuil^2)
[2]96   IF liste[0] NE -1 THEN BEGIN
97      index = index[liste]
98      indexbis = indexbis[liste]
99      for pt = 0, n_elements(index)-1 do begin
100         plots, [xf[index[pt]], xf[indexbis[pt]]], [yf[index[pt]], yf[indexbis[pt]]] $
[29]101           , color = coast_color, thick = coast_thick, /normal, _extra = ex
[2]102      endfor
103   ENDIF
104;
105; we plot the borders of the diamond in this sense : /
106;
[29]107   if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2)
[2]108   distanceseuil = (!p.position[2]-!p.position[0])/xseuil
[226]109; liste: liste des points i pour lesquels on va tracer un segment
[2]110   index = lindgen(nx, ny-1)
111   index = index[0:nx-2, *]
112   indexbis = index+nx+((index/nx+onemore) MOD 2)
113   liste = where(mask[index+1]+mask[indexbis] EQ 1 $
[29]114                 AND (xf[index]-xf[indexbis])^2+(yf[index]-yf[indexbis])^2 LE distanceseuil^2)
[2]115   IF liste[0] NE -1 THEN BEGIN
116      index = index[liste]
117      indexbis = indexbis[liste]
118      for pt = 0, n_elements(index)-1 do begin
119         plots, [xf[index[pt]], xf[indexbis[pt]]], [yf[index[pt]], yf[indexbis[pt]]] $
[29]120           , color = coast_color, thick = coast_thick, /normal, _extra = ex
[2]121      endfor
122   ENDIF
123
124;---------------------------------------------------------
125   if keyword_set(key_performance) THEN print, 'temps drawcoast_e', systime(1)-tempsun
126   return
127end
Note: See TracBrowser for help on using the repository browser.