[GRASS-user] r.mapcalc question
ak7 at jupiter.uni-freiburg.de
Thu Jan 28 09:33:04 EST 2010
so variables are functions in this case.
I've been searching for a while, but I cannot find any tool like grasss
r.mapcalc that is a bit more flexible, eg. that can handle recursive tasks.
Thanks a lot,
Marco Lechner - FOSSGIS e.V. schrieb:
> Hi Achim,
> the neighborhood modifier doesn't seem to accept functions (you also
> could try rand(), ...)
> Achim Kisseler schrieb:
>> Hello grass-users,
>> I have a problem running a r.mapcalc procedure:
>> given two maps
>> with 0,1,-1 entries
>> I want to run:
>> r.mapcalc "the_map=if(isnull(the_map),the_map[dir_x,dir_y],null())"
>> in order to make a r.water.outlet on many many areas at the same time.
>> The error I get is:
>> syntax error, unexpected NAME, expecting INTEGER or '-'
>> why does dir_x/dir_y does not return an integer here? Using int(dir_x)
>> also does not work.
>> Until now I use a r.mapcalc command with many "if", checking the
>> direction of every pixel every time. But this is quite slow.
>> grass-user mailing list
>> grass-user at lists.osgeo.org
> grass-user mailing list
> grass-user at lists.osgeo.org
More information about the grass-user