[GRASS-user] generate a grid with sequential numbers

Markus Neteler neteler at osgeo.org
Mon Sep 17 12:32:39 PDT 2012


Here you go - see screenshot:

# get rows and cols as environment variables
eval `g.region -g`
r.mapcalc "grid_seq = col() * $rows + row() + $cols - ($rows + $cols)"

d.mon x0
d.rast.num grid_seq

Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: raster_grid_seq.png
Type: image/png
Size: 12849 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120917/fe3205a8/attachment.png>


More information about the grass-user mailing list