[GRASS-user] Shell scripting basic issues

2012-08-20 Thread DavidRA
Hi, I'm currently exploring the GRASS capabilities for shell scripting. After the first steps I found that I don't see how to do some basic stuff. For example: Is there a way to access the matrix of cell values of a raster to get those values? If I were operating GRASS directly, I'd use r.what...

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

2012-07-04 Thread DavidRA
I see, then I'll leave aside the scripting option in order to delve into the r.series code. Thanks a lot! -- View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-implement-this-kind-of-operation-tp4984790p4985959.html Sent from the Grass - Users mailing list archive at Nabble

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

2012-07-03 Thread DavidRA
Ok, with this I made some progress. I still don't understand many details of the code, but the overall operation is now much clearer to me, so I'll keep investigating on this way. I'd also like to explore the scripting possibility. Do you think that mi purpose could be achieved with shell or pytho

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

2012-07-02 Thread DavidRA
It is a version of the ordered weighted averaging, with two kind of weights: one associated with the raster layer and another one that depends on the order of the cell. Look, this is how I do it with r.mapcalc when there are just 2 raster layers: where "w"i are the weights of each layer and "zi"

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

2012-07-02 Thread DavidRA
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. 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

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

2012-06-29 Thread DavidRA
Hi, here's the problem: I need to implement an operation in GRASS wich takes an UNDEFINED number of raster layers and, for each position, takes the cell of each raster, sort those values, makes some calculations and store the result in the same position of the output raster. I know how to do it wi