[GRASS-user] v.rast.stats locks up on wingrass (problem adding columns)

Can I infer from this open ticket that v.rast.stats is currently not
functional within a Windows operating environment?

http://trac.osgeo.org/grass/ticket/1110#comment:2
http://trac.osgeo.org/grass/ticket/1110#comment:2

I am running GRASS 6.4.1 through R 2.13.1 on Windows XP and I need to obtain
cell frequency counts from a categorical raster based on a polygon vector.
If v.rast.stats is out of commission, what other options can people
recommend?

DGann

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/v-rast-stats-locks-up-on-wingrass-problem-adding-columns-tp6701826p6701826.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Fri, Aug 19, 2011 at 6:19 AM, deagan <tylerdrudolph@gmail.com> wrote:

Can I infer from this open ticket that v.rast.stats is currently not
functional within a Windows operating environment?

http://trac.osgeo.org/grass/ticket/1110#comment:2
http://trac.osgeo.org/grass/ticket/1110#comment:2

I am running GRASS 6.4.1 through R 2.13.1 on Windows XP and I need to obtain
cell frequency counts from a categorical raster based on a polygon vector.

Please update to 6.4.2, using the latest of the nightly builds [0]

Markus M

[0] http://wingrass.fsv.cvut.cz/grass64/

deagan wrote:

Can I infer from this open ticket that v.rast.stats is
currently not functional within a Windows operating
environment?

http://trac.osgeo.org/grass/ticket/1110#comment:2

I wouldn't say that for sure. My best advice is to try it for
yourself and see if it works or not. As per the ticket, you
might try it a few times if it fails at first. Please report
your experiences successful or not to the bug report.

If v.rast.stats is out of commission, what other options
can people recommend?

since v.rast.stats is just a shell script combining a number
of other GRASS modules, you could always just run the individual
commands by hand:

http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/scripts/v.rast.stats/v.rast.stats

The script itself hasn't changed in 7 months.

You might find some other options in the wiki add-ons site.

good luck,
Hamish

My best advice is to try it for yourself and see if it works or not.

I did using 6.4.1 and got the error message reported by others:

C:/GRASS-64-SVN/scripts/v.rast.stats: line 268: v.db.addcol: command not
found
ERROR: Cannot continue (problem adding columns).

since v.rast.stats is just a shell script combining a number of other
GRASS modules, you could always just run the individual commands by hand

I am currently evaluating this as an alternative, though I am also batch
scripting through R and new to GRASS, so... In the meantime...

Please update to 6.4.2, using the latest of the nightly builds [0]

I updated to the latest nightly build (WinGRASS-6.4.SVN-r47756-1) and
resubmitted my job through R 2.13.1 (using spgrass6), and this time I get
the following error message:

execGRASS("v.rast.stats", flags="verbose",
parameters=list(raster="eosd_resample", vector="mcp80s", colprefix="p80"))

Error in system(cmd0, intern = TRUE) : 'v.rast.stats.exe' not found
Error in parseGRASS(cmd) : v.rast.stats not found

The script is indeed there, but I am not familiar enough with the inner
workings of GRASS to speculate on where the executable comes in.... Has
v.rast.stats been temporarily disabled in WinGRASS or is this something new?

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/v-rast-stats-locks-up-on-wingrass-problem-adding-columns-tp6701826p6703669.html
Sent from the Grass - Users mailing list archive at Nabble.com.

hi,

there seems to be 2 issues here

C:/GRASS-64-SVN/scripts/v.rast.stats: line 268: v.db.addcol: command not

found

ERROR: Cannot continue (problem adding columns).

tested with WinGRASS-6.4.SVN-r47756-1-Setup.exe

   v.db.addcol map=mygeology@test columns=helli
   DBMI-DBF driver error:
   ERROR: Fehler beim Ausführen von: 'ALTER TABLE mygeology ADD COLUMN helli
   '.
  ERROR: Cannot continue (problem adding column).

so v.db.addcol seems to still have problems with dbf-driver in windows

execGRASS("v.rast.stats", flags="verbose",

parameters=list(raster="eosd_resample", vector="mcp80s", >colprefix="p80"))

Error in system(cmd0, intern = TRUE) : 'v.rast.stats.exe' not found <=
Error in parseGRASS(cmd) : v.rast.stats not found

I've no experience in using grass within a R session, but there is a wrapper
script

C:\Program Files\GRASS 6.4.SVN\bin\v.rast.stats.bat

and execGRASS() seems to wait for an v.rast.stats.exe which doesn't exist.

best regards
Helmut

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/v-rast-stats-locks-up-on-wingrass-problem-adding-columns-tp6701826p6703813.html
Sent from the Grass - Users mailing list archive at Nabble.com.

I've no experience in using grass within a R session,

I'm always doing in the other way in windows: R within a Grass-session

see

http://grass.osgeo.org/wiki/R_statistics#MS_Windows

and there Usage II

or see also

http://lists.osgeo.org/pipermail/grass-stats/2010-September/001274.html

best regards
Helmut

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/v-rast-stats-locks-up-on-wingrass-problem-adding-columns-tp6701826p6703827.html
Sent from the Grass - Users mailing list archive at Nabble.com.