[GRASS-dev] Re: [GRASS GIS] #1248: r.thin may be broken

GRASS GIS trac at osgeo.org
Tue Dec 21 12:40:44 EST 2010


#1248: r.thin may be broken
-------------------------+--------------------------------------------------
 Reporter:  cmbarton     |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  Raster       |     Version:  svn-trunk                
 Keywords:  r.thin       |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------

Comment(by mmetz):

 Replying to [comment:2 cmbarton]:
 > I just tested this in GRASS 6.4.1 and r.thin works fine. All thinning of
 the same map in spearfish was completed in 1 pass.

 Try r44645. The bug is that G_get_map_row() in 6.x converts NULLs to
 zeros, but there is no equivalent to G_get_map_row() in 7.0, where
 G_get_map_row() is usually replaced with Rast_get_c_row() which does not
 convert NULLs to zeros. The current fix converts NULLs to zeros in
 r.thin/io.c, but a proper fix would be to update r.thin and test against
 NULL values with !Rast_is_c_null_value() instead of e.g. buf[col] != 0.
 Padding should also use NULL and not zero. Therefore I would opt to change
 the status to enhancement if the current fix is working.

 And all modules that use G_get_map_row() in 6.x should be checked...

 Markus M

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



More information about the grass-dev mailing list