[GRASS-dev] Re: [GRASS GIS] #70: imagery modules: strip @mapset part

GRASS GIS trac at osgeo.org
Sat Jun 21 06:11:31 EDT 2008


#70: imagery modules: strip @mapset part
----------------------+-----------------------------------------------------
  Reporter:  hamish   |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect   |      Status:  new                      
  Priority:  major    |   Milestone:  6.4.0                    
 Component:  default  |     Version:  svn-trunk                
Resolution:           |    Keywords:  imagery                  
----------------------+-----------------------------------------------------
Comment (by glynn):

 Replying to [comment:17 neteler]:

 > It compares the wrong mapsets here (G_mapset() should possibly not
 > used on the left side, see function remove_subgroup_files() of main.c of
 i.group.

 AFAICT, you should be able to use in=lsat7_2000_61 at landsat to acheive the
 desired result.

 Beyond that: unless "landsat" is in the mapset search path, this isn't a
 bug; you '''should''' have to explicitly specify the @landsat part.

 OTOH, in the case where it '''is''' in the mapset search path, it's a
 limitation of the imagery library. The I_find_* functions only ever look
 for files in the current mapset (passing a qualified name to I_find_* will
 generate an error if the @mapset part doesn't specify the current mapset).

 I didn't change this when I fixed the I_find_* functions because I can't
 easily determine if it will introduce potentially dangerous bugs (e.g.
 deleting the wrong file).

 Unlike the G_find_* functions, the I_find_* functions don't have a mapset
 argument, so the caller doesn't get the option of passing G_mapset()
 instead of "" to prevent the use of other mapsets. Bear in mind that the
 same functions are used for both input (where other mapsets may be used)
 and output (where only the current mapset may be used).

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/70#comment:20>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list