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

Interpolation/

clickincell.pro

click on a map and find in which cell the click was

topclickincell Grid

result = clickincell(CELLTYPE=CELLTYPE, DRAWCELL=DRAWCELL, COLOR=COLOR, ORIGINAL=ORIGINAL, IJ=IJ, _EXTRA=_EXTRA)

Return value

the index of the selected cells regarding to the grid which is in memory in the variable of the common. If /ij keyword is activated give 2D array (2, n) which are the i,j position of the n selected cells.

Keywords

CELLTYPE       

= 'T', 'W', 'U', 'V' or 'F' This this the type of point that is located in the center of the cell which the click is located. default is T type of cell (with corner defined by F points).

DRAWCELL       

to draw the cell in which we clicked

COLOR       

the color used to draw the cells (Clicking one more time in the same cell will draw the cell with the white color)

ORIGINAL       

to get the position of the cell regarding the original grid (with no key_shift, ixminmesh, iyminmesh...)

IJ       

see outputs

_EXTRA       

to pass extra keywords to inquad and plot (when /drawcell)

Examples

IDL> res = clickincell() Click with the left button to select a cell. Clicking one more time in the same cell remove the cell from the selection. Click on the right button to quit. IDL> plt, findgen(jpi,jpj),/nodata,map=[90,0,0],/ortho IDL> print, clickincell(/draw,color=150,/xy)

Version history

Version

$Id: clickincell.pro 157 2006-08-21 09:01:50Z navarro $

History

Sebastien Masson (smasson@lodyc.jussieu.fr) August 2003

Other attributes

Uses routines

common.pro

Statistics

McCabe cyclic 33
McCabe essential 8
McCabe modular design 1
Produced by IDLdoc 2.0.