[GRASS-dev] Re: [GRASS GIS] #763: r.statistics method=distribution: no percentages for negative basemap values

GRASS GIS trac at osgeo.org
Fri Sep 10 19:24:51 EDT 2010


#763: r.statistics method=distribution: no percentages for negative basemap
values
--------------------+-------------------------------------------------------
 Reporter:  peifer  |       Owner:  grass-dev@…              
     Type:  defect  |      Status:  new                      
 Priority:  normal  |   Milestone:  6.4.0                    
Component:  Raster  |     Version:  6.4.0 RCs                
 Keywords:          |    Platform:  Unspecified              
      Cpu:  x86-32  |  
--------------------+-------------------------------------------------------

Comment(by glynn):

 Replying to [comment:3 peifer]:

 > Why should cat=0 cause problems for r.stats or r.statistics? It is a
 legal value, by the end of the day.

 Prior to 5.x, category zero was often used as a no-data value. 5.x added
 support for a distinguished null value (as well as floating-point), but
 some code still follows the old zero-is-null convention. In particular:

  * If a raster map doesn't have a null bitmap, any zeros are converted to
 nulls upon read.

  * The functions G_get_map_row() and G_get_map_row_nomask() convert any
 nulls to zeros upon read, so any module which uses these functions cannot
 distinguish between zero and null.

 Given the large number of occurrences of G_get_map_row[_nomask]() in 6.4,
 I can't help wondering whether all of the modules which were converted to
 use Rast_get_c_row() in 7.0 were actually converted correctly, or whether
 the function call was changed without any effort made to handle nulls.

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



More information about the grass-dev mailing list