Interpolation/
clickincell.pro
click on a map and find in which cell the click was
clickincell
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'
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 returns
_EXTRA
Used 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 372 2008-08-08 12:31:53Z pinsard $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
August 2003
Other attributes
Uses routines
common
Produced by IDLdoc 2.0.