[GRASS-dev] QGIS winGRASS blank space problem
Paul Kelly
paul-grass at stjohnspoint.co.uk
Mon Jun 4 10:36:16 EDT 2007
Hello Markus
On Mon, 4 Jun 2007, Markus Neteler wrote:
> Hi,
>
> a friend told me that with the latest QGIS release candidate,
> there is a winGRASS problem:
>
> $ v.rast.stats vector=CEA_riserve raster=CEA_slope colprefix=delete
> c:/Programmi/Quantum: c:/Programmi/Quantum: No such file or directory
v.rast.stats is a shell script, so you are likely to have loads of
problems if not finding it nearly impossible to get it working properly on
Windows. I notice there are loads of places in it that paths aren't
quoted so that is probably the first problem (although to be fair that is
also a problem for Unix and isn't a problem for Windows if you don't
install software in paths with spaces in them!).
Then there is the fact that Msys doesn't understand Windows-style paths,
but the output from g.tempfile will be a Windows-style path. (A question
for another day: perhaps we could investigate other bourne-compatible
shells for Windows that *do* understand Windows paths? But some GRASS
scripts would probably need to be changed in other ways to be compatible
with that; maybe more effort than it's worth.)
Another thing is that v.rast.stats attempts to call v.db.addcol and fails
- it's also a script, so on Windows is represented by the file
v.db.addcol.bat - apparently Msys's shell can't run .bat files. That's
actually something I didn't forsee when implementing the .bat
script-launching mechanism for Windows. You could probably work around it
by putting in the full path ($GISBASE/scripts) before calling another
script from a script, but then you still have the issue with incompatible
path names as I mentioned above.
In general it's a pleasant surprise if some shell scripts to happen to
work OK on Windows, and IMHO shouldn't really be considered a bug if they
don't. I feel the fact that QGIS includes a copy of Msys with GRASS gives
the "illusion" of GRASS being more compatible with Windows than it really
is - the truly native WinGRASS we're working on is a more accurate
expression of GRASS's compatiblity with Windows as I see it.
Paul
More information about the grass-dev
mailing list