Hi there, I was just checking the latest CVS and saw that my r.mapcalc
addition hadn't been added yet.
I was hoping someone with appropriate permissions could do so.
My dispersal simulation tool (which I hope to release properly in a
few months) requires the addition to function correctly.
Much thanks,
Joel
---------- Forwarded message ----------
From: Joel Pitt <joel.pitt@gmail.com>
Date: Oct 26, 2006 9:39 PM
Subject: Re: [GRASS-dev] r.mapcalc addition
To: Glynn Clements <glynn@gclements.plus.com>
Cc: Hamish <hamish_nospam@yahoo.com>, grass-dev@grass.itc.it
On 10/25/06, Glynn Clements <glynn@gclements.plus.com> wrote:
> However, I'll follow Glynn's suggestion and read the seed in the
> evaluate() function. This will be more robust if other functions are
> implemented that call the RNG.
>
> On this topic, would there be any call for implementing more
> complicated probability distribution functions? Or is the philosophy
> of mapcalc to have the simplest elements necessary?
A Gaussian distribution might be useful, as you can't readily
implement that using existing r.mapcalc functions (the usual
implementation uses iteration, which r.mapcalc doesn't support).
For enhancements which might be useful to other users, I'd suggest
posting an announcement (or the code itself) to the list. If enough
people express an interest in having the functionality built in, we
can add it.
Adding new functions is quite straightforward; OTOH, we don't want to
bloat r.mapcalc with code which is unlikely to be used by anyone but
its author.
For more complex tasks, there's always R/GRASS. r.mapcalc will always
be bound by its structural limitations (row-by-row processing,
inability to define new functions, etc).
I've attached a diff of evaluate.c and the related html files that I'm aware of.
Turns out it was alot simpler adding the functionality as a environment variable
--
-Joel
"Wish not to seem, but to be, the best."
-- Aeschylus
--
-Joel
"Unless you try to do something beyond what you have mastered, you
will never grow." -C.R. Lawton
(attachments)
r.mapcalc.diff (2.36 KB)