[GRASS-user] r.mapcalc results have 'categories'

Veronica Andreo veroandreo at gmail.com
Wed Jan 6 19:46:35 PST 2016


Hi Ken,

> > ...
> Before I supply a full script with external data, I wonder if I can make
synthetic data to debug/recreate this more easily. I see that I can do
"r.mapcalc 'x = 42'" to create a new vector raster with 1 point. Is there
some easy method to create a 2D raster within grass? Or should I make a
simple ASCII CSV file and read that in? If I can recreate the behavior with
a small hand-made data set I think it would help me figure out what is
wrong with the data.

r.mapcalc uses the region definition to create the new maps. So, if your
region is one cell (you can check with g.region -p) you'll have a one cell
raster as output. Therefore, if you want a 2D raster, just set a bigger
region, something like g.region cols=2 rows=2 (check the manual for more
options to set the region), and then the r.mapcalc operation you need.

Hope it helps,
Vero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160107/9a6e3292/attachment.html>


More information about the grass-user mailing list