[GRASS-stats] wish: less verbose messages in rgrass7

Markus Neteler neteler at osgeo.org
Wed Sep 9 14:35:25 PDT 2015


Hi,

today we used "rgrass7" on Windows (and I made some tests on Linux, too).

I was wondering about a few warnings which might be suppressed to avoid
user confusion:


######## Windows: calling GRASS 7.1 from R session

> library(rgrass7)
Loading required package: sp
Loading required package: XML
GRASS GIS interface loaded with GRASS version: (GRASS not running)
Warning messages:
1: package ‘rgrass7’ was built under R version 3.2.2
2: package ‘sp’ was built under R version 3.2.2
3: package ‘XML’ was built under R version 3.2.2

> initGRASS(gisBase = "C:/OSGeo4W/apps/grass/grass-7.1.svn",
+ gisDbase = "C:/Users/marissa/GRASSdata/",
+ location = "CA", mapset = "Aegypti")
Error in initGRASS(gisBase = "C:/OSGeo4W/apps/grass/grass-7.1.svn",
gisDbase = "C:/Users/marissa/GRASSdata/",  :
  A GISRC file already exists; to override, set override=TRUE


==> the last sentence is not quite clear. Perhaps change to

"A GISRC file already exists (the GRASS GIS mapset is already in use); to
override, set override=TRUE"


> initGRASS(gisBase = "C:/OSGeo4W/apps/grass/grass-7.1.svn",
+ gisDbase = "C:/Users/marissa/GRASSdata/",
+ location = "CA", mapset = "Aegypti",
+ override=TRUE)
gisdbase    C:/Users/marissa/GRASSdata/
location    CA
mapset      Aegypti
rows        265
columns     230
north       452000
south       -608000
west        -376000
east        544000
nsres       4000
ewres       4000
projection  +proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0
+y_0=-4000000 +no_defs +a=6378137 +rf=298.257222101
+towgs84=0.000,0.000,0.000 +to_meter=1
Warning message:
In dir.create(gisDbase) : 'C:\Users\marissa\GRASSdata' already exists

==> the last warning is not clear to me. If I set override=TRUE, I refer to
the mapset's gislock, hence the dir.create(gisDbase should not be done at
all. Is it a bug?


############## Linux

> ncdata <- readRAST("elevation")
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>

==> these warning make probably sense in a GRASS session but IMHO here
less. They could be suppressed with --q in the respective GRASS module call.


Creating BIL support files...
Exporting raster as floating values (bytes=4)
 100%
Warning messages:
1: In execGRASS("r.info", flags = "g", map = vname[i], intern = TRUE,  :
  The command:
r.info -g map=elevation
produced at least one warning during execution:
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>

==> here it is, I suggest to use r.info --q

2: In execGRASS("r.info", flags = "r", map = vname[i], intern = TRUE,  :
  The command:
r.info -r map=elevation
produced at least one warning during execution:
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>

==> same thing

3: In execGRASS("r.out.bin", flags = rOutBinFlags, input = vname[i],  :
  The command:
r.out.bin -b -f input=elevation
output=/home/neteler/grassdata/nc_spm_08_grass7/user1/.tmp/pgis_north/elevation
bytes=4 null=54
produced at least one warning during execution:
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>
WARNING: 'cellhd/elevation' was found in more mapsets (also found in
         <PERMANENT>)
WARNING: Using <elevation at user1>

==> same thing

Creating BIL support files...
Exporting raster as floating values (bytes=4)
 100%

thanks
Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-stats/attachments/20150909/c0965bed/attachment.html>


More information about the grass-stats mailing list