[GRASS-dev] [GRASS GIS] #2255: g.mlist warnings for layers found in other mapsets

#2255: g.mlist warnings for layers found in other mapsets
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
g.mlist produces warnings for all layers in other mapsets with names
matching the search pattern, even if mapset is set (which should force it
to search in that mapset only)

This is on GRASS 7.1.svn (2014), in Linux (Ubuntu 13.10)

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2255&gt;
GRASS GIS <http://grass.osgeo.org>

#2255: g.mlist warnings for layers found in other mapsets
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

Not sure what the issue is... here an example:

{{{
grass71 -c ~/grassdata/nc_spm_08_grass7/user2

GRASS 7.1.svn (nc_spm_08_grass7):~ > g.mlist rast
raster map(s) available in mapset <PERMANENT>:
aspect
basin_50K
...
elev_state_500m
elevation
elevation_shade
...
zipcodes
zipcodes_dbl
GRASS 7.1.svn (nc_spm_08_grass7):~ >

# now copy over "elevation" map as found in search path to
# current mapset:
GRASS 7.1.svn (nc_spm_08_grass7):~ > g.copy rast=elevation,elevation
Copy raster <elevation@PERMANENT> to current mapset as <elevation>

# list again:
GRASS 7.1.svn (nc_spm_08_grass7):~ > g.mlist rast
raster map(s) available in mapset <user2>:
WARNING: 'cell/elevation' was found in more mapsets (also found in
          <PERMANENT>)
WARNING: Using <elevation@user2>
elevation
raster map(s) available in mapset <PERMANENT>:
aspect
basin_50K
boundary_county_500m
...
elev_state_500m
WARNING: 'cell/elevation' was found in more mapsets (also found in
          <PERMANENT>)
WARNING: Using <elevation@user2>
elevation@PERMANENT
elevation_shade
facility
...
zipcodes_dbl
GRASS 7.1.svn (nc_spm_08_grass7):~ >

GRASS 7.1.svn (nc_spm_08_grass7):~ > g.mapsets -l
Available mapsets:
PERMANENT landsat neteler user1 user2

GRASS 7.1.svn (nc_spm_08_grass7):~ > g.mapsets -p
Accessible mapsets:
user2 PERMANENT
}}}

So it tells the user that the map "elevation" exists multiple times in
the search path ("Accessible mapsets")... Guess that's how it should be.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2255#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

Let me try to clarify with an example. Suppose I have two different mapsets, Ethiopia and Ethiopiabackup, each with a number of layers with the same name. Now, if I use (just selecting 1 layer to keep the example short):

g.mlist type=rast pattern=fireprob_rf1 mapset=Ethiopia

Gives me:

fireprob_rf1
raster map(s) available in mapset :
WARNING: ‘cell/fireprob_rf1’ was found in more mapsets (also found in )
WARNING: Using fireprob_rf1@Ethiopia

If I use

g.mlist type=rast pattern=fireprob_rf1

I get:

fireprob_rf1
fireprob_rf1@Ethiopiabackup
raster map(s) available in mapset :
WARNING: ‘cell/fireprob_rf1’ was found in more mapsets (also found in )
WARNING: Using fireprob_rf1@Ethiopia
raster map(s) available in mapset :
WARNING: ‘cell/fireprob_rf1’ was found in more mapsets (also found in )
WARNING: Using fireprob_rf1@Ethiopia

In both cases the warnings are redundant. In example one I am only interested in what is in the mapset Ethiopia, thus, no need to tell me similar layers are in the mapset Ethiopiabackup or that the ones in the mapset Ethiopia will be used (what does that mean anyway, the function is to list the names of the layers, not to use them in any way). In example two, I can see from the list of layers that there are layers with the same name that come from different mapset. No need to warn me again.

I don’t think those warnings were displayed in earlier grass 7.0 version and I just checked and they are certainly not in 6.4.

···

On Fri, Apr 18, 2014 at 1:09 PM, GRASS GIS <trac@osgeo.org> wrote:

#2255: g.mlist warnings for layers found in other mapsets
-------------------------±-------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
Cpu: Unspecified |
-------------------------±-------------------------------------------------

Comment(by neteler):

Not sure what the issue is… here an example:

{{{
grass71 -c ~/grassdata/nc_spm_08_grass7/user2

GRASS 7.1.svn (nc_spm_08_grass7):~ > g.mlist rast
raster map(s) available in mapset :
aspect
basin_50K

elev_state_500m
elevation
elevation_shade

zipcodes
zipcodes_dbl
GRASS 7.1.svn (nc_spm_08_grass7):~ >

now copy over “elevation” map as found in search path to

current mapset:

GRASS 7.1.svn (nc_spm_08_grass7):~ > g.copy rast=elevation,elevation
Copy raster elevation@PERMANENT to current mapset as

list again:

GRASS 7.1.svn (nc_spm_08_grass7):~ > g.mlist rast
raster map(s) available in mapset :
WARNING: ‘cell/elevation’ was found in more mapsets (also found in
)
WARNING: Using elevation@user2
elevation
raster map(s) available in mapset :
aspect
basin_50K
boundary_county_500m

elev_state_500m
WARNING: ‘cell/elevation’ was found in more mapsets (also found in
)
WARNING: Using elevation@user2
elevation@PERMANENT
elevation_shade
facility

zipcodes_dbl
GRASS 7.1.svn (nc_spm_08_grass7):~ >

GRASS 7.1.svn (nc_spm_08_grass7):~ > g.mapsets -l
Available mapsets:
PERMANENT landsat neteler user1 user2

GRASS 7.1.svn (nc_spm_08_grass7):~ > g.mapsets -p
Accessible mapsets:
user2 PERMANENT
}}}

So it tells the user that the map “elevation” exists multiple times in
the search path (“Accessible mapsets”)… Guess that’s how it should be.


Ticket URL: <http://trac.osgeo.org/grass/ticket/2255#comment:1>
GRASS GIS <http://grass.osgeo.org>

#2255: g.mlist warnings for layers found in other mapsets
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by wenzeslaus):

Copied from [http://lists.osgeo.org/pipermail/grass-
dev/2014-April/068356.html grass-dev]:

{{{
$ g.mlist type=rast pattern=fireprob_rf1 mapset=Ethiopia
fireprob_rf1raster map(s) available in mapset <Ethiopia>:
WARNING: 'cell/fireprob_rf1' was found in more mapsets (also found in
<Ethiopiabackup>)
WARNING: Using <fireprob_rf1 at Ethiopia>
}}}

{{{
$ g.mlist type=rast pattern=fireprob_rf1
fireprob_rf1
fireprob_rf1@Ethiopiabackup
raster map(s) available in mapset <Ethiopia>:
WARNING: 'cell/fireprob_rf1' was found in more mapsets (also found in
<Ethiopiabackup>)
WARNING: Using <fireprob_rf1@Ethiopia>
raster map(s) available in mapset <Ethiopiabackup>:
WARNING: 'cell/fireprob_rf1' was found in more mapsets (also found in
<Ethiopiabackup>)
WARNING: Using <fireprob_rf1@Ethiopia>
}}}

It also seems that the warning is reported multiple times and that the
overall formatting is strange (e.g. the line `raster map(s) available in
mapset <Ethiopia>:` followed by `WARNING: ...`).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2255#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2255: g.mlist warnings for layers found in other mapsets
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by hcho):

Fixed in r60261.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2255#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2255: g.mlist warnings for layers found in other mapsets
---------------------------------+------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: LibRaster | Version: unspecified
Keywords: g.mlist, d.rast.leg | Platform: Unspecified
      Cpu: Unspecified |
---------------------------------+------------------------------------------
Changes (by neteler):

  * keywords: => g.mlist, d.rast.leg
  * component: Default => LibRaster

Comment:

In relbranch7 I have the same issue with d.rast.leg:

{{{
GRASS 7.0.0svn (eu_laea):~ > d.rast.leg diff
WARNING: 'cell/diff' was found in more mapsets (also found in
          <modis_lst_europe>)
WARNING: Using <diff@modis_lst_reconstructed_europe_daily>
WARNING: 'cellhd/diff' was found in more mapsets (also found in
          <modis_lst_europe>)
WARNING: Using <diff@modis_lst_reconstructed_europe_daily>
WARNING: 'cellhd/diff' was found in more mapsets (also found in
          <modis_lst_europe>)
...
(many more)
}}}

It seems to be a more generic issue.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2255#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#2255: g.mlist warnings for layers found in other mapsets
-----------------------------------------+----------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: LibRaster | Version: unspecified
Keywords: g.mlist, d.rast.leg, d.rast | Platform: Unspecified
      Cpu: Unspecified |
-----------------------------------------+----------------------------------
Changes (by neteler):

  * keywords: g.mlist, d.rast.leg => g.mlist, d.rast.leg, d.rast

Comment:

Replying to [comment:3 hcho]:
> Fixed in r60261.

(backported in r61040)

Glynn posted some comments here:

http://lists.osgeo.org/pipermail/grass-dev/2014-June/069628.html

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2255#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>