[GRASS-user] How to implement this kind of operation?

Marcello Gorini gorini at gmail.com
Mon Jul 2 03:07:27 PDT 2012


DavidRA wrote:

I guess I could use the code of r.series, modifying it a bit to obtain a new
> function. The problem is that... man, that code is hard to understand.


Sorry if I gave you the impression that I am a skilled programmer in C.
Actually, I forgot the majority of GRASS modules are in C (or python now).
I always use shell scripts to do my stuff, so I was actually thinking of
Shell (what would be much easier to tweak).



> I do
> have some notions of C, but here I'm finding a lot of trouble to see what
> it
> does. For example, I don't see where it does the calculations: there is a
> section of the code with a comment saying "process the data", but inside of
> it, where is the average calculated? The average, or any of the other
> methods.
>
>
My God, it is indeed complex! I guess, somehow by including stats.h, they
are done by a simple call to the functions (somewhere, because I can't see
either),
so he is not implementing the calculations in the code.

Well, at least that is my most humble (and ignorant) opinion.

Cheers,
Marcello.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120702/9c41de43/attachment.html>


More information about the grass-user mailing list