source: trunk/SRC/Documentation/idldoc_assistant_output/Interpolation/inquad.html @ 338

Last change on this file since 338 was 338, checked in by smasson, 16 years ago

update documentation

File size: 8.1 KB
Line 
1
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4  <head>
5    <title>inquad.pro (SAXO Documentation Assistant)</title>
6  </head>
7
8  <body text="#000000" bgcolor="#FFFFFF">
9
10   
11<!-- Navbar template takes a structure with the following fields:
12       overview_href :
13       overview_selected :
14       dir_overview_href :
15       dir_overview_selected :
16       categories_href :
17       categories_selected :
18       index_href :
19       index_selected :
20       search_href :
21       search_selected :
22       file_selected :
23       source_href :
24       source_selected :
25       help_href :
26       help_selected :
27       etc_selected :
28
29       prev_file_href :
30       next_file_href :
31
32       view_single_page_href :
33       view_frames_href :
34
35       summary_fields_href :
36       summary_routine_href :
37       details_routine_href :
38
39       title :
40       subtitle :
41       user :
42-->
43
44
45<table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom">
46  <tr>
47    <td width="10%">
48<a href="imoms3.html"><img src="./../prev.gif" border="0" alt="Previous"></a></td>
49    <td width="80%" align="center" valign="center">
50<font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../home.html">Overview</a></font></td>
51    <td width="10%" align="right">
52<a href="inrecgrid.html"><img src="./../next.gif" border="0" alt="Next"></a></td>
53  </tr>
54</table>
55
56
57    <h1><font size="-2">Interpolation/</font></h1>
58    <h2>inquad.pro</h2>
59
60    <dl>
61    </dl>
62
63   
64 to find if an (x,y) point is in a quadrilateral (x1,x2,x3,x4)
65
66
67   
68
69     
70      <a name="#_inquad"></a>
71
72      <h2>inquad  <font size="-1" color="#006633">
73 Grid
74</font></h2>
75
76      <p><font face="Courier"><i>result = </i>inquad(<i><a href="#_inquad_keyword_x">x</a>, <a href="#_inquad_keyword_y">y</a>, <a href="#_inquad_keyword_x1">x1</a>, <a href="#_inquad_keyword_y1">y1</a>, <a href="#_inquad_keyword_x2">x2</a>, <a href="#_inquad_keyword_y2">y2</a>, <a href="#_inquad_keyword_x3">x3</a>, <a href="#_inquad_keyword_y3">y3</a>, <a href="#_inquad_keyword_x4">x4</a>, <a href="#_inquad_keyword_y4">y4</a></i>, <a href="#_inquad_keyword_ONSPHERE">ONSPHERE</a>=<i>ONSPHERE</i>, <a href="#_inquad_keyword_DOUBLE">DOUBLE</a>=<i>DOUBLE</i>, <a href="#_inquad_keyword_DELTA">DELTA</a>=<i>DELTA</i>, <a href="#_inquad_keyword_NOPRINT">NOPRINT</a>=<i>NOPRINT</i>, <a href="#_inquad_keyword_NEWCOORD">NEWCOORD</a>=<i>NEWCOORD</i>)</font></p>
77
78   
79
80
81    <h3>Return value</h3>
82 a n elements vector where n is the number of elements of
83 x. res[i]=j means that the point number i is located in the
84 quadrilateral number j with (0 <= j <= n_elements(x0)-1)
85
86
87   
88    <h3>Parameters</h3>
89   
90
91    <a name="#_inquad_keyword_x"></a>
92    <h4>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
93      <font size="-1" color="#006633">in</font>
94     
95     
96      <font size="-1" color="#006633">required</font>
97     
98     
99     
100     
101    </h4>
102
103   
104   
105
106    <a name="#_inquad_keyword_y"></a>
107    <h4>y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
108      <font size="-1" color="#006633">in</font>
109     
110     
111      <font size="-1" color="#006633">required</font>
112     
113     
114     
115     
116    </h4>
117
118   
119 the coordinates of the point we want to know where it is.
120 Must be a scalar if /ONSPHERE activated else can be scalar or array.
121
122   
123
124    <a name="#_inquad_keyword_x1"></a>
125    <h4>x1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
126      <font size="-1" color="#006633">in</font>
127     
128     
129      <font size="-1" color="#006633">required</font>
130     
131     
132     
133     
134    </h4>
135
136   
137   
138
139    <a name="#_inquad_keyword_y1"></a>
140    <h4>y1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
141      <font size="-1" color="#006633">in</font>
142     
143     
144      <font size="-1" color="#006633">required</font>
145     
146     
147     
148     
149    </h4>
150
151   
152   
153
154    <a name="#_inquad_keyword_x2"></a>
155    <h4>x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
156      <font size="-1" color="#006633">in</font>
157     
158     
159      <font size="-1" color="#006633">required</font>
160     
161     
162     
163     
164    </h4>
165
166   
167   
168
169    <a name="#_inquad_keyword_y2"></a>
170    <h4>y2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
171      <font size="-1" color="#006633">in</font>
172     
173     
174      <font size="-1" color="#006633">required</font>
175     
176     
177     
178     
179    </h4>
180
181   
182   
183
184    <a name="#_inquad_keyword_x3"></a>
185    <h4>x3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
186      <font size="-1" color="#006633">in</font>
187     
188     
189      <font size="-1" color="#006633">required</font>
190     
191     
192     
193     
194    </h4>
195
196   
197   
198
199    <a name="#_inquad_keyword_y3"></a>
200    <h4>y3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
201      <font size="-1" color="#006633">in</font>
202     
203     
204      <font size="-1" color="#006633">required</font>
205     
206     
207     
208     
209    </h4>
210
211   
212   
213
214    <a name="#_inquad_keyword_x4"></a>
215    <h4>x4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
216      <font size="-1" color="#006633">in</font>
217     
218     
219      <font size="-1" color="#006633">required</font>
220     
221     
222     
223     
224    </h4>
225
226   
227   
228
229    <a name="#_inquad_keyword_y4"></a>
230    <h4>y4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
231      <font size="-1" color="#006633">in</font>
232     
233     
234      <font size="-1" color="#006633">required</font>
235     
236     
237     
238     
239    </h4>
240
241   
242 the coordinates of the quadrilateral given in the CLOCKWISE order.
243 Scalar or array.
244
245   
246   
247
248   
249    <h3>Keywords</h3>
250
251   
252    <a name="#_inquad_keyword_ONSPHERE"></a>
253    <h4>ONSPHERE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
254     
255     
256     
257     
258     
259     
260     
261     
262    </h4>
263
264   
265 to specify that the quadrilateral are on a sphere and
266 that their coordinates are longitude-latitude coordinates. In this
267 case, east-west periodicity, poles singularity and other pbs
268 related to longitude-latitude coordinates are managed
269 automatically.
270
271   
272    <a name="#_inquad_keyword_DOUBLE"></a>
273    <h4>DOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
274     
275     
276     
277     
278     
279     
280     
281     
282    </h4>
283
284   
285 use double precision to perform the computation
286
287   
288    <a name="#_inquad_keyword_DELTA"></a>
289    <h4>DELTA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
290     
291     
292     
293     
294     
295     
296      <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>4</i></font>
297     
298    </h4>
299
300   
301 to speed up the program, we reduce the aera where we look for potential
302 quadrilaterals containing (x,y). Delta defines the limit of the box
303 centred on (x,y) with a zonal and meridional extent of delta degrees.
304
305   
306    <a name="#_inquad_keyword_NOPRINT"></a>
307    <h4>NOPRINT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
308     
309     
310     
311     
312     
313     
314     
315     
316    </h4>
317
318   
319 to suppress the print messages.
320
321   
322    <a name="#_inquad_keyword_NEWCOORD"></a>
323    <h4>NEWCOORD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
324     
325     
326     
327     
328     
329     
330     
331     
332    </h4>
333
334   
335
336   
337   
338
339    <h3>Examples</h3><pre>
340
341 IDL> x = 1.*[1, 2, 6, 7, 3]
342 IDL> y = 1.*[1, 3, 3, 4, 7]
343 IDL> x1 = 1.*[0,4,2]
344 IDL> y1 = 1.*[1,4,8]
345 IDL> x2 = 1.*[1,6,4]
346 IDL> y2 = 1.*[5,6,8]
347 IDL> x3 = 1.*[3,8,4]
348 IDL> y3 = 1.*[4,4,6]
349 IDL> x4 = 1.*[2,6,2]
350 IDL> y4 = 1.*[0,2,6]
351 IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata
352 IDL> for i=0,2 do oplot, [x4[i],x1[i],x2[i],x3[i],x4[i]],[y4[i],y1[i],y2[i],y3[i],y4[i]]
353 IDL> oplot, x, y, color = 20, psym = 1, thick = 2
354 IDL> print, inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4)
355
356 On a sphere see
357 <a href="..//Interpolation/clickincell.html">clickincell</a> ...
358
359    </pre><h3>Version history</h3>
360   
361    <h4>Version</h4>
362 $Id: inquad.pro 327 2007-12-13 16:22:35Z pinsard $
363
364    <h4>History</h4>
365      Sebastien Masson (smasson@lodyc.jussieu.fr)
366      August 2003
367      Based on Convert_clic_ij.pro written by Gurvan Madec
368
369   
370
371    <h3>Known issues</h3>
372   
373   
374   
375    <h4>Restrictions</h4>
376 I think degenerated quadrilateral (e.g. flat of twisted) is not work.
377 This has to be tested.
378
379
380   
381   
382   
383   
384   
385   
386   
387
388    <font size="-3"><p>&nbsp;</p></font>
389    <hr size="1" color="#CCCCCC"/>
390     
391
392   
393
394    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
395
396  </body>
397</html>
Note: See TracBrowser for help on using the repository browser.