[GRASS-user] mapcalc and cell coordinates

Paul Kelly paul-grass at stjohnspoint.co.uk
Mon Jul 14 06:12:59 EDT 2008


On Mon, 14 Jul 2008, G. Allegri wrote:

> How can I control mapalgebra "if" statements on the base of the
> coordinates values of a cell?
> The base problem is to change the values of some specific cells on the
> base of their coordinates.

I suspect this might not be possible with r.mapcalc, because each 
variable in an r.mapcalc expression is effectively an entire map and the 
expression used to generate the output map can't be changed based on the 
co-ordinates of individual cells in the input map. I.e., the same 
expression applies to each and every cell in the output map.

That's my understanding anyway, based on an answer Glynn gave me a few 
years ago:
http://lists.osgeo.org/pipermail/grass-user/2003-January/008182.html
Does that seem relevant to your case?

Paul


More information about the grass-user mailing list