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

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

improvements/corrections of some *.pro headers

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