[GRASS-dev] Re: [GRASS GIS] #1525: r.mask cannot use float maps

GRASS GIS trac at osgeo.org
Fri Dec 30 23:01:50 EST 2011

#1525: r.mask cannot use float maps
 Reporter:  pertusus  |       Owner:  grass-dev@…              
     Type:  defect    |      Status:  new                      
 Priority:  minor     |   Milestone:  7.0.0                    
Component:  Raster    |     Version:  svn-trunk                
 Keywords:            |    Platform:  Linux                    
      Cpu:  x86-64    |  

Comment(by glynn):

 Replying to [ticket:1525 pertusus]:

 > I had a look at r.mask and r.mask for 6.4.1, besides being a python
 script, the difference seems to be that in the svn version there is a test
 that the map is indeed a CELL map, which fails and give the error message,
 while there was no such test in the shell script.  The code is along

 The test was added (incorrectly) in r46379. The CELL requirement should
 only apply if the maskcats= option was given. Fixed in r49997.

 > Maybe r.reclass does the magic float to integer quantification stuff?

 The conversion is performed when the mask is used, not when it is set. It
 isn't necessary to use r.mask to create a mask; if a map named MASK exists
 in the current mapset, it is automatically used as a mask. The code which
 reads raster maps always reads the mask as CELL. The conversion from the
 stored type to the requested type (using quantisation rules in the case of
 FP->integer conversions) is built into libraster (libgis in versions
 before 7.0).

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

More information about the grass-dev mailing list