[GRASS-dev] [GRASS GIS] #873: r.univar: allow percentile= to be doubles

GRASS GIS trac at osgeo.org
Sat Jan 16 05:02:21 EST 2010


#873: r.univar: allow percentile= to be doubles
-----------------------------+----------------------------------------------
 Reporter:  hamish           |       Owner:  grass-dev at lists.osgeo.org
     Type:  enhancement      |      Status:  new                      
 Priority:  major            |   Milestone:  6.5.0                    
Component:  Raster           |     Version:  svn-develbranch6         
 Keywords:  r.univar, stats  |    Platform:  All                      
      Cpu:  All              |  
-----------------------------+----------------------------------------------
 Hi,

 for `r.univar` it is useful to have sub-integer percentile output, e.g.
 for calculating confidence intervals/sigma at 68.2689%, 95.45%, and
 99.73%. Currently `r.univar` only accepts whole integers for the
 percentile=. Actually it's worse: it accepts floats on the command line
 but they quietly get truncated into integers.(!)

 see http://article.gmane.org/gmane.comp.gis.grass.user/20744

 currently `r.colors.stddev` is hit by this and probably anyone doing stats
 on map values.


 the attached patch (vs. 6.5svn) attempts to fix this. please review.
 R-bridge users please compare with R's answers.

 {{{
 #spearfish
 g.region rast=elevation.10m
 r.univar elevation.10m perc=68,68.2689,95,95.45,99,99.73 -e
 }}}


 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/873>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list