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

Ken Mankoff mankoff at gmail.com
Thu Jan 7 12:23:16 PST 2016


Hi,

So while preparing a minimal example the bug got resolved. I think it had to do with stale variables (or a stale mask) that remained in the session. It seems the cause wasn't in the software but something between the keyboard and monitor outside of the laptop...

Thanks for the help so far,

  -k.

On 2016-01-06 at 22:46, Veronica Andreo <veroandreo at gmail.com> wrote:
> 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



More information about the grass-user mailing list