Generate a grid with sequential numbers
Revision as of 12:38, 17 September 2012 by Neteler (new)
Q: How to generate a grid where the cell numbers are sequential?
A: You can useand for this:
# get rows and cols as environment variables eval `g.region -g` # generate the grid r.mapcalc "grid_seq = col() * $rows + row() + $cols - ($rows + $cols)" d.mon x0 d.rast.num grid_seq
The resulting raster map looks like this: