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

GRASS GIS trac at osgeo.org
Sat May 4 21:05:24 PDT 2013


#1525: r.mask cannot use float maps
-------------------------------+--------------------------------------------
 Reporter:  pertusus           |       Owner:  grass-dev@…              
     Type:  defect             |      Status:  new                      
 Priority:  minor              |   Milestone:  6.4.3                    
Component:  Raster             |     Version:  svn-trunk                
 Keywords:  r.mask, r.reclass  |    Platform:  Linux                    
      Cpu:  x86-64             |  
-------------------------------+--------------------------------------------
Changes (by hamish):

  * keywords:  => r.mask, r.reclass
  * milestone:  6.4.2 => 6.4.3


Comment:

 fix backported to devbr6 and relbr64 in r56123,4.

 re. the error msg itself, r.reclass doesn't actually mind FP values and
 maps as input, that's where the quant rules come into effect.

 there is some quant/rounding strangeness going on in r.reclass though:
 {{{
 # spearfish + 6.5svn

 G65> g.region -d

 G65> r.info -t fields
 datatype=CELL

 G65> r.mapcalc "seed = float(fields) + 0.55"
 G65> r.info -r seed
 min=1.55
 max=63.55

 G65> echo "30.45 thru 40.45 = 1" | r.reclass in=seed out=MASK
 30.950000 rounded up to 30
 40.950000 rounded up to 40
 [Raster MASK present]
 }}}

 ? "30.95 rounded up to 30", ... ?

 (see scan_value() in r.reclass/parse.c)


 Hamish

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



More information about the grass-dev mailing list