I¹m involved in a project to develop a linkage between agent based modeling
platforms and GRASS. One item that seems will be very important is way to
change a group of cell values (i.e., cat values) given their xy coordinates.
I realize that it is possible to use the map calculator to create a new map
with 1 new cell changed. But AFAICT, there is no way to send a set of xy
values, along with new cat values for each xy pair and change cells in an
existing map or create a new map with the changed cells (and old values for
the rest of the cells). Markus suggested that I run this by the developers
list. I can make this a formal Œwish¹ if it helps.
From the perspective of someone who is fairly ignorant of C, it seems to me
that the (conceptually at least) easiest thing to do is to alter r.recode to
accept input (stdin or text file) in the form of
x1,y1,val1
x2,y2,val2
or even better, if we want to keep a similar format to that now used for cat
value recoding
x1:x2:y1:y2 val1
x3:x4:y3:y4 val2
where x1:x2 defines a range of x coordinates and y1:y2 defines a range of y
coordinates. This way single cells or blocks of cells could be referenced
and changed. This mode would probably open up a number of new modeling
possibilities within GRASS too.
This mode could be controlled by a flag. What do you all think? Is this
feasible? Is it fairly easy or fairly difficult? Is there a better way to
change a group of cell values based on their xy coordinates?
Thanks for your input.
Michael
___________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
WWW - http://www.public.asu.edu/~cmbarton
Phone: 480-965-6262
Fax: 480-965-7671