[GRASSLIST:8451] Re: extracting the value of a raster cell

Hamish hamish_nospam at yahoo.com
Wed Sep 28 19:57:51 EDT 2005


> Does anyone know how to extract the value of a cell at given  
> coordinates from a raster layer?

r.what

> I am writing a script that will calculate the spatial mean for a given
> raster layer. Therefore, I need to be able to access the values of
> raster cells.

r.univar?

If you want the stats within a buffer around a point, I would suggest a
vector point map -> v.buffer -> v.to.rast -> MASK map -> r.univar in a
loop, or probably simpler with Markus's new v.rast.stats module in
6.1-cvs.



Hamish




More information about the grass-user mailing list