NAME:clickincell
PURPOSE: click on a map and find in which cell the click was
CATEGORY:finding where is a point on a grid
CALLING SEQUENCE:
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.
INPUTS:None
KEYWORD PARAMETERS:
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 outpus
_EXTRA: to pass extra keywords to inquad and plot (when /drawcell)
OUTPUTS:
the 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.
COMMON BLOCKS:common.pro
SIDE EFFECTS:
RESTRICTIONS:
EXAMPLE:
IDL> plt, findgen(jpi,jpj),/nodata,map=[90,0,0],/ortho
IDL> print, clickincell(/draw,color=150,/xy)
MODIFICATION HISTORY: