<div dir="ltr">Hi,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 28, 2013 at 2:29 AM, Helena Mitasova <span dir="ltr"><<a href="mailto:hmitaso@ncsu.edu" target="_blank">hmitaso@ncsu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">regarding the r.mapcalc issue in command console on wingrass -<br>
(sorry I did not make it clear it was for wingrass - it always worked well on Mac and linux)<br>
<br>
It is not critical, windows users can still use the mapcalculator GUI where it runs OK,<br>
but the r.mapcalc in the command console still does not seem to work - tried by a student<br>
using June 26 snapshot this is what she says:<br>
<br>
Here are examples of the commands run and the errors received:<br>
r.mapcalc urban2_30m=if(landuse96_28m==1 || landuse96_28m==2,landuse96_28m,null())<br>
syntax error, unexpected $end, expecting ')'<br>
Parse error<br>
'landuse96_28m' is not recognized as an internal or external<br>
command,<br>
operable program or batch file.<br>
<br>
r.mapcalc MASK=if((elevation<100 && elevation>60) && (landuse96_28m==1 || landuse96_28m==2),1,null())<br>
1 was unexpected at this time.<br>
<br>
This is the same we were getting in GRASS6.4.3RC2 and apparently the proposed solutions did not work<br>
<a href="http://lists.osgeo.org/pipermail/grass-dev/2013-February/062047.html" target="_blank">http://lists.osgeo.org/pipermail/grass-dev/2013-February/062047.html</a><br>
<a href="http://lists.osgeo.org/pipermail/grass-dev/2013-March/062607.html" target="_blank">http://lists.osgeo.org/pipermail/grass-dev/2013-March/062607.html</a></blockquote><div><br></div><div><br></div><div>I had the opportunity to test Glynn's patch (the second link above) on Windows and it seems to solve the problems. From the discussion I can see that Markus already tested it but he was not successful, so I applied the patch to 6.5 first.</div>
<div>All the commands causing problems are now working with both (", ') quotes and without, only the command with || requires quotes.</div><div><br></div><div>Anna</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
if I get this confirmed I will file a bug report (I thought I already did, but it is not there).<br>
If it is not fixable it should be at least mentioned on the known issues web page<br>
<a href="http://grasswiki.osgeo.org/wiki/WinGRASS_Current_Status#Raster_modules" target="_blank">http://grasswiki.osgeo.org/wiki/WinGRASS_Current_Status#Raster_modules</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Helena<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
><br>
> Helena:<br>
>> I am also wondering whether the r.mapcalc expressions with || (or)<br>
>> now run from the wxGUI command console.<br>
><br>
> I just tried on linux 6.4.3svn wxGUI command console:<br>
> r.mapcalc "either = 0 || 1"<br>
> and it worked.<br>
><br>
> In general I wouldn't be surprised if full command line quoting took<br>
> years and huge amounts of effort to (re)perfect. And even then, does<br>
> it try to follow Bash conventions, or python, or DOS, or some mix of<br>
> all those? How much do we try to (re)teach about command line<br>
> techniques in our own docs? Will unquoted input=C:\Users\files\data.txt<br>
> always be parsed to input=C:Usersfilesdata.txt (literal \U, \f, \d)<br>
> in the command console in that case?<br>
><br>
><br>
> best,<br>
> Hamish<br>
><br>
> _______________________________________________<br>
> grass-dev mailing list<br>
> <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
<br>
_______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
</div></div></blockquote></div><br></div></div>