[GRASS5] r.mapcalc question

Jachym Cepicky jachym.cepicky at centrum.cz
Fri Apr 22 01:39:39 EDT 2005


hallo,
On Thu, Apr 21, 2005 at 04:25:44PM +0200, Stefan Paulick wrote:
> Hello list, 
> 
> I didn*t find a hint in the documentation is r.mapcalc is able to acces a 
> single cell in a xy-location. 
> 
> Is there a way to write the neighborhood-modifier that it is not applied to 
> the entire map but only to one absolut refered cell? 
> 
> 
> 
> Mit freundlichen Grüßen / With kindest regards 
> 
> Stefan Paulick 
> 
> 
see  http://grass.itc.it/grass60/manuals/html60_user/r.mapcalc.html

 row()                  current row of moving window
 col()                  current col of moving window
 x()                    current x-coordinate of moving window
 y()                    current y-coordinate of moving window
 ewres()                current east-west resolution
 nsres()                current north-south resolution

exmaple:

if(row() == 20 && col() == 20, 1, null());

Jachym
-- 
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://www.fle.czu.cz/~jachym/gnupg_public_key/




More information about the grass-dev mailing list