Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-03-17 Thread Markus Neteler
On Sun, Mar 17, 2013 at 12:23 AM, Glynn Clements wrote: ... > Replace the split() function in core/utils.py with: > > def split(s): > """!Platform spefic shlex.split""" > if sys.platform == "win32": > return shlex.split(s.replace('\\', r'\\')) >

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-03-16 Thread Glynn Clements
Markus Neteler wrote: > On Fri, Mar 15, 2013 at 8:31 PM, Vaclav Petras wrote: > ... > > I'm not following the discussion, so I don't know what to patch. > > Nor me... sorry. http://lists.osgeo.org/pipermail/grass-dev/2013-February/062043.html Replace the split() function in core/utils.py with

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-03-16 Thread Glynn Clements
Markus Neteler wrote: > > or provide them with a modified version. > > I'm not able to compile winGRASS. Perhaps it is "as simple" as replacing > a file? Maybe better patch in SVN and wait for the nightly built... No compilation is required. They just need to replace the file etc/gui/wxpython/c

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-03-16 Thread Markus Neteler
On Fri, Mar 15, 2013 at 8:31 PM, Vaclav Petras wrote: ... > I'm not following the discussion, so I don't know what to patch. Nor me... sorry. Markus ___ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-03-15 Thread Vaclav Petras
On 15 March 2013 20:08, Markus Neteler wrote: > On Fri, Mar 15, 2013 at 6:09 PM, Glynn Clements > wrote: > ... >> Tell them to modify utils.py as described above, > > GRASS newcomers, hard to realize. > >> or provide them with a modified version. > > I'm not able to compile winGRASS. Perhaps it i

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-03-15 Thread Markus Neteler
On Fri, Mar 15, 2013 at 6:09 PM, Glynn Clements wrote: ... > Tell them to modify utils.py as described above, GRASS newcomers, hard to realize. > or provide them with a modified version. I'm not able to compile winGRASS. Perhaps it is "as simple" as replacing a file? Maybe better patch in SVN a

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-03-15 Thread Anna Kratochvílová
On Fri, Mar 15, 2013 at 6:17 PM, Glynn Clements wrote: > > Helmut Kudrnovsky wrote: > >> - working: >> >> r.mapcalc >> ndvi3=float(lsat7_2002_40-lsat7_2002_30)/float(lsat7_2002_40+lsat7_2002_30) >> (Fri Feb 15 16:23:42 2013) Command finished (0 sec) >> >> r.mapcalc urban1_30m=if(landuse96_28m==1,1

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-03-15 Thread Glynn Clements
Helmut Kudrnovsky wrote: > - working: > > r.mapcalc > ndvi3=float(lsat7_2002_40-lsat7_2002_30)/float(lsat7_2002_40+lsat7_2002_30) > (Fri Feb 15 16:23:42 2013) Command finished (0 sec) > > r.mapcalc urban1_30m=if(landuse96_28m==1,1,0)+if(landuse96_28m==2,2,0) > > (Fri Feb 15 16:24:2

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-03-15 Thread Glynn Clements
Markus Neteler wrote: > > gui/wxpython/core/utils.py has: > > > > def split(s): > > """!Platform spefic shlex.split""" > > if sys.version_info >= (2, 6): > > return shlex.split(s, posix = (sys.platform != "win32")) > > elif sys.platform

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-03-15 Thread Helena Mitasova
On Mar 15, 2013, at 10:06 AM, Markus Neteler wrote: > On Fri, Feb 15, 2013 at 2:29 PM, Glynn Clements > wrote: >> >> Helena Mitasova wrote: >> The wxGUI command line has its own rules (see shlex.split() in the Python library documentation). >>> >>> running mapcalc through the wxGUI

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-03-15 Thread Markus Neteler
On Fri, Feb 15, 2013 at 2:29 PM, Glynn Clements wrote: > > Helena Mitasova wrote: > >> > The wxGUI command line has its own rules (see shlex.split() >> > in the Python library documentation). >> >> running mapcalc through the wxGUI command line is where the students have >> problems in winGRASS >

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-02-15 Thread Helmut Kudrnovsky
>Helmut - can you please try this commands with data in nc_spm_08 >just pasting them in command console in wingrass? sure. tested in the wxGUI-command console with: System Info GRASS version: 6.4.3svn

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-02-15 Thread Glynn Clements
Helena Mitasova wrote: > > The wxGUI command line has its own rules (see shlex.split() > > in the Python library documentation). > > running mapcalc through the wxGUI command line is where the students have > problems in winGRASS > (but it works on Mac) > > Helmut - can you please try this co

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-02-14 Thread Helena Mitasova
Anna, you are right - it is the commands that include || that give an error, I finally had time to go through all of the examples in the lab - all the other ones work so far. Is this something that can be fixed? Helena On Thu, Feb 14, 2013 at 12:25 PM, Anna Kratochvílová wrote: > On Thu, Feb 1

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-02-14 Thread Anna Kratochvílová
On Thu, Feb 14, 2013 at 5:41 PM, Helena Mitasova wrote: > > >> The wxGUI command line has its own rules (see shlex.split() >> in the Python library documentation). > > running mapcalc through the wxGUI command line is where the students have > problems in winGRASS > (but it works on Mac) > > Helm

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-02-14 Thread Helena Mitasova
> The wxGUI command line has its own rules (see shlex.split() > in the Python library documentation). running mapcalc through the wxGUI command line is where the students have problems in winGRASS (but it works on Mac) Helmut - can you please try this commands with data in nc_spm_08 just pas

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-02-03 Thread Glynn Clements
Helena Mitasova wrote: > BTW when you look at the Notes in the manual, the suggestion there > is to put single quotes around the expression (right side of the > equation), while the section about raster map layer names explains > that putting your expression in double quotes will interpret it as

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-02-02 Thread Helena Mitasova
On Feb 2, 2013, at 8:27 AM, Glynn Clements wrote: > > Helena Mitasova wrote: > >> Over the years there have been changes in the formatting of r.mapcalc >> expressions >> and it appears the currently there is no single way that would work >> everywhere >> (you either need quotes or it does not

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-02-02 Thread Glynn Clements
Helena Mitasova wrote: > Over the years there have been changes in the formatting of r.mapcalc > expressions > and it appears the currently there is no single way that would work everywhere > (you either need quotes or it does not work with quotes and in GRASS6.4.3 the > space around = is not n

Re: [GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-02-01 Thread Markus Neteler
On Fri, Feb 1, 2013 at 4:16 AM, Helena Mitasova wrote: > Over the years there have been changes in the formatting of r.mapcalc > expressions > and it appears the currently there is no single way that would work everywhere I use it for a long time and have a standard formatting which always works

[GRASS-dev] formatting expressions for r.mapcalc in GRASS6.4.3

2013-01-31 Thread Helena Mitasova
Over the years there have been changes in the formatting of r.mapcalc expressions and it appears the currently there is no single way that would work everywhere (you either need quotes or it does not work with quotes and in GRASS6.4.3 the space around = is not necessary). I have tried to summariz