v.what -i

Michael Shapiro shapiro at zorro.cecer.army.mil
Mon Aug 17 10:04:23 EDT 1992

There is no good answer, except that  the  existence  of  the  d.
commands  makes  the -i option inconsistent. For example should a
-i option be added to g.region to  do  d.zoom  (and  get  rid  of
d.zoom).  Ideally  r.what  and  v.what and the like should accept
keyboard event and mouse event transparently (with out having  to
specify  a  -i option), but this impossbile with the basic design

I place my vote with d.what.vect and v.what (no -i).  Cloning  of
code  is,  while  not  good  design,  necessary  since the actual
"extraction" of information from the vector file  (or  raster  in
the  case  of r.what) is embeded in the module itself rather than
being  placed  in  a  library  routine  which  both  v.what   and
d.what.vect could use.

|In this second version, I have removed all mouse support to make it
|consistent (in this regard) to r.what. Thus, it is no longer a
|replacement for d.what.vect.  This was done with ifdef's, so it is
|easy to switch it back.  While it's good to maintain consistency, I
|was trying to keep repetitive code and the number of grass commands to
|a minimum.
|If someone has more time to spend on this than myself, I would
|recommend that 
| 1. v.what be modified to include support for multiple vector files AND 
|    for the mouse (the latter is just ifdef'ed out right now),
| 2. mouse support be added for r.what
| 3. d.what.vect and r.what.vect be removed.
|Of course, these are just my opinions.  This would be a good way
|for an aspiring programmer to get his/her feet wet [hint, hint],
|because the program design and most coding is already done.  
|Then again, this may go against keeping display commands prefixed
|d-dot, so maybe it's not such a good idea... anyone have any thoughts
|on this?


More information about the grass-dev mailing list