Michael Barton wrote:


On 11/12/07 4:14 AM, "Glynn Clements" <[EMAIL PROTECTED]> wrote:

Michael Barton wrote:

It appears that r.mapcalc is NOT working. We get an error with even the
simplest of mapcalc statements. Javi will send the error message tonight or
tomorrow, but it is a red herring IMHO, stating that it is missing an "=".
We have the same error if we run r.mapcalc via the TclTk interface
(r.mapcalculator) or run it from the console command line. Other commands
work find from the console command line. This is *critical*, of course, as
r.mapcalc is very important to GRASS analysis and map management.
FWIW, the only r.mapcalc files which have changed in the last three
months are:

Makefile
map3.c
r.mapcalc.html
r3.mapcalc.html

The Makefile changes were part of the parallel build effort, and don't
change what is compiled or which switches are used. The map3.c changes
are just standardisation of messages, and only affect r3.mapcalc.

I presume that this is related to your local environment; otherwise, I
would expect to see other people reporting it.

Unfortunately, not many people testing new WinGRASS alpha builds yet I fear.

I did some more tests this morning, this time on my Mac and may have
discovered the cause of the error.

For the current WinGRASS binary, it is necessary to use the command console
for command-line use of GRASS.

We received an error with the following simple mapcalc statements

r.mapcalc 'frict=1'
r.mapcalc 'test=pendiente*2'

It turns out that you cannot use single quotes in this context. You need to
use regular quotes. So the way to specify the same mapcalc statements from
the GUI command console is...

r.mapcalc "frict=1"
r.mapcalc "test=pendiente*2"

I thought we had tried double quotes too, but maybe we didn't. I'll wait for
Javi to check email and test. The worrisome thing is that we initially used
the GUI map calculator from the menu and got an error. I tried it this
morning on my Mac and did not get an error.

In windows you don't need any quotation marks, so

r.mapcalc frict=1 also works, as does r.mapcalc x=frict/3.

The only issue might be special characters which you would have to escape somehow.


Moritz
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to