[GRASS-user] Query by mouse

Hamish hamish_nospam at yahoo.com
Wed Feb 14 00:12:52 EST 2007


Aldo Clerici wrote:
> I'm looking for a way for a multiple query with mouse on GRASS6.2 or
> 6.3. The Query button in the Map Display of Gis Manager returns the
> values of the active (highlighted) map only, even if more maps are
> displayed.
> 
> The r.what command accessed through Raster > Query by coordinate(s)
> requires to define the coordinates (even if this is defined as
> optional) and the mouse can not be used.
> 
> The d.what.rast (and d.where)can be used in command line mode (lower
> part of the Output window)but requires the opening of a new external
> monitor (Otherwise: No graphics device selected).  
> 
> Accidentally I discovered a strange and atypical way for a multiple
> query. I highligh the name of a map in the map list of the Gis
> Manager. In the panel 'Display raster maps' I manually insert the
> names of the other maps to query, separated by commas.  At this point
> the Query button displays the content of all specified maps. This
> works but doesn't seem a neat solution.
> 
> Does anybody suggest a better way for a multiple query? 


In an xmon if you overlay multiple raster maps,

G63> d.mon x0
G63> d.rast elevation.dem
G63> d.rast -o slope
G63> d.rast -o geology

then d.what.rast will give all three:

G63> d.what.rast -t
594278.69230769:4919478.84615385:1
elevation.dem at PERMANENT :1554:
slope at PERMANENT, quant  :22:
slope at PERMANENT, actual :22.878124:23 degrees
geology at PERMANENT :5:limestone


The query in gis.m only queries the currenly selected map, even though
r.what (which it calls) has the capacity to query multiple maps at the
same time. Your "," trick works from that.

Another command prompt way using d.where:
G63> d.where | r.what in=elevation.dem,slope,geology


Hamish




More information about the grass-user mailing list