[GRASS5] region growing - r.mapcalc bug?

Jachym Cepicky jachym.cepicky at centrum.cz
Tue Mar 1 08:53:17 EST 2005


Hallo,
I try to produce some region growing map after the approach descriped in
"r.mapcalc: An Algebra for GIS and Image Processing" (site no. 7) from
http://grass.itc.it/gdp/raster/mapcalc-algebra.pdf (to be found also on
http://grass.itc.it/grass60/manuals/html60_user/r.mapcalc.html).

I try something like this:

 rg = if(bod,bod, \
         if (bod[0,-1], 1, \
             if(bod[0,1], 1, \
                 if(bod[-1,0], 1, \
                     if(bod[1,0],1)))))

The only result I get, is the "central" point (bod[0,0]), no neighborhood is
produced :-/

Could it be some bug in r.mapcalc code?

Thank you

Jáchym
-- 
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