hi
i have problems with 2 or more function when i wrote in the samle line.
how can we make nested function simply by using the functionality of grass
eg : erosion
/r.mapcalc "partieOK=if(r.neighbors input=247general@ventoux_sud_quentin method=diversity size=3)>1,247general@ventoux_sud_quentin,9)"
/
the answer : Invalid map <r.neighbors>
thanks a lot
/
On Mon, May 18, 2009 at 8:28 PM, Quentin Page
<quentin.page@avignon.inra.fr> wrote:
hi
i have problems with 2 or more function when i wrote in the samle line.
how can we make nested function simply by using the functionality of grass
eg : erosion
/r.mapcalc "partieOK=if(r.neighbors input=247general@ventoux_sud_quentin
method=diversity size=3)>1,247general@ventoux_sud_quentin,9)"
You cannot combine commands like this:
- r.mapcalc has its own syntax (see g.manual r.mapcalc)
- r.neighbors is a separate command
Possible Solution (untested, compiled from your example):
- run first r.neighbors with output
r.neighbors input=247general@ventoux_sud_quentin method=diversity
size=3 output=237diversity
- then run r.mapcalc, using this output
r.mapcalc "partieOK=if(237diversity >1, 247general@ventoux_sud_quentin, 9)"
Hope this helps,
Markus