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 gl...@gclements.plus.com 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('\\',

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 wenzesl...@gmail.com 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

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

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 wenzesl...@gmail.com 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

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 gl...@gclements.plus.com 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

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 == win32:

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:24 2013)

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 gl...@gclements.plus.com 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

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 gl...@gclements.plus.com 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

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 nete...@osgeo.org wrote: On Fri, Mar 15, 2013 at 6:09 PM, Glynn Clements gl...@gclements.plus.com 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

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 commands

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-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

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 hmit...@ncsu.edu 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)

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á kratocha...@gmail.com

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 a

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

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 work with

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 hmit...@ncsu.edu 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

[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