[GRASS-dev] Re: [GRASS GIS] #1276: r.null in winGRASS does not work properly

GRASS GIS trac at osgeo.org
Wed Jan 18 06:19:41 EST 2012


#1276: r.null in winGRASS does not work properly
------------------------------+---------------------------------------------
 Reporter:  helena            |       Owner:  grass-dev@…              
     Type:  defect            |      Status:  new                      
 Priority:  critical          |   Milestone:  6.4.2                    
Component:  Raster            |     Version:  6.4.1 RCs                
 Keywords:  r.null, wingrass  |    Platform:  MSWindows 7              
      Cpu:  Unspecified       |  
------------------------------+---------------------------------------------

Comment(by hamish):

 Hi,

 a debug message I threw into devbr6 shows that the "5" was making it into
 the variable ok.

 if you convert streets_speed to a DCELL map from a CELL map:
 {{{
   r.mapcalc "streets_speed.DCELL = double(streets_speed)"
 }}}

 then r.null works as expected.


 I strongly suspect the trouble is on this line of r.null/mask.c:
 {{{
   if (change_null && G_is_null_value(rast, data_type))
         G_set_raster_value_d(rast, new_null, data_type);
 }}}

 new_null is always sent as DCELL, but data_type changes.


 (n.b. for CELL maps the command line value for new_null is laundered into
 something CELL compatible by main.c when it is first read in, but only if
 you enter a non-integer for null=)


 Hamish

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



More information about the grass-dev mailing list