[GRASS-stats] Using GRASS addons in R on Windows

Roger Bivand Roger.Bivand at nhh.no
Tue Jan 12 01:33:34 PST 2016


On Tue, 12 Jan 2016, Helmut Kudrnovsky wrote:

>> Wrong target, please use:
>> http://win-builder.r-project.org/s90s00N7rhyt/rgrass7_0.1-4.zip
>

OK. Please check that r.roughness.vector.bat is present in:

C:\Users\xy\AppData\Roaming\GRASS7\addons\bin, or
C:\Program Files\GRASS GIS 7.1.svn\bin

Possibly run

debug(parseGRASS)
parseGRASS("r.roughness.vector")

and check that its *.bat file is present in WN_bat under debugging. I'll 
try it too.

The revisions add *.bat from local addons to the global list of *.bat, but 
something may have got lost - it worked for me for r.basin.

Roger


>> utils:::menuInstallLocal()
> Paket ‘rgrass7’ erfolgreich ausgepackt und MD5 Summen abgeglichen
>
> GRASS version: 7.1.svn 
> GRASS SVN revision: 67543 
> Build date: 2016-01-11 
> Build platform: x86_64-w64-mingw32 
> GDAL: 1.11.3 
> PROJ.4: 4.9.2 
> GEOS: 3.5.0 
> SQLite: 3.7.17 
> Python: 2.7.5 
> wxPython: 2.8.12.1 
> Platform: Windows-7-6.1.7601-SP1 
>
>> library(rgrass7)
> Loading required package: sp
> Loading required package: XML
> GRASS GIS interface loaded with GRASS version: GRASS 7.1.svn (2016)
> and location: nc_spm_08_grass7
>
> --------------
> binary addon (r.stream.order)
>
>> execGRASS("r.watershed", elevation="elevation", threshold=10000,
>> accumulatio$
> SECTION 1a (of 5): Initiating Memory.
> SECTION 1b (of 5): Determining Offmap Flow.
> 100%
> SECTION 2: A* Search.
> 100%
> SECTION 3a: Accumulating Surface Flow with MFD.
> 100%
> SECTION 3b: Adjusting drainage directions.
> 100%
> SECTION 4: Watershed determination.
> 100%
> SECTION 5: Closing Maps.
> 100%
>>
>
>> execGRASS("r.stream.order", stream_rast="mystreams",
>> direction="myflowdir", $
> All in RAM calculation...
> Reading raster map <mystreams>...
> 100%
> Reading raster map <myflowdir>...
> 100%
> Finding nodes...
> Calculating Strahler's stream order...
> Writing output raster maps...
> --------------
> python addon (r.roughness.vector):
>
>> execGRASS("r.slope.aspect", elevation="elevation", slope="myslope",
>> aspect="$
> 100%
> Aspect raster map <myaspect> complete
> Slope raster map <myslope> complete
>
>> execGRASS("r.roughness.vector", elevation="elevation", slope="myslope",
>> aspe$
> Error in system(cmd0, intern = TRUE) : 'r.roughness.vector.exe' not found
> Error in parseGRASS(cmd, legacyExec = legacyExec) :
>  r.roughness.vector not found
> --------------
> python GRASS script (r.reclass.area):
>
>> execGRASS("r.reclass.area", input="zipcodes",
>> output="zipcode_larger2000ha",$
> Error in system(cmd0, intern = TRUE) : 'r.reclass.area.exe' not found
> Error in parseGRASS(cmd, legacyExec = legacyExec) :
>  r.reclass.area not found
> --------------
>
> it seems to be the same behaviour: 
>
> binary addons (exe living in e.g.
> C:\Users\xy\AppData\Roaming\GRASS7\addons\bin) are found.
> python scripts (with related bat-files in e.g.
> C:\Users\xy\AppData\Roaming\GRASS7\addons\bin or in e.g. C:\Program
> Files\GRASS GIS 7.1.svn\bin) are not found as it is searched for e.g.
> r.reclass.area.exe (see above).
>
>
>
> -----
> best regards
> Helmut
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-GRASS-addons-in-R-on-Windows-tp5244411p5244654.html
> Sent from the Grass - Stats mailing list archive at Nabble.com.
> _______________________________________________
> grass-stats mailing list
> grass-stats at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://depsy.org/person/434412


More information about the grass-stats mailing list