[GRASSLIST:3326] Re: r.stats

Gordon Keith gordon.keith at csiro.au
Mon Mar 11 23:20:34 EST 2002


On Thu, 7 Mar 2002 23:54, Markus Neteler wrote:
> Hi Gordon,
>
> On Thu, Mar 07, 2002 at 02:37:57PM +1100, Gordon Keith wrote:
> > Particular problems I am having:
> > > r.statistics base=facies cover=gabo20_slope method=average
> >
> > out=avg_slope
> > Sorry, <z> is not a valid flag
>
> this problem was fixed recently (2002-03-04), the
> next (!) CVS snapshot
> http://grass.itc.it/grass5/source/snapshot_release/
> will contain the fix (or you get it from CVS directly).

I've got the snapshot and r.statistics now runs, but does not seem to 
produce meaningful results for method=average,min,max or sum,

For example
> r.statistics base=facies cover=howe_surf method=sum out=howe_surf_sum
> r.stats howe_surf_sum
r.stats:  100%
11
*
> r.info howe_surf_sum | more
 +-----------------------------------------------------------------+
 | Layer:    howe_surf_sum          Date: Tue Mar 12 15:02:30 2002 |
 | Mapset:   howe                   Login of Creator: kei037       |
 | Location: sef                                                   |
 | DataBase: /homes/kei037/grassdata                               |
 | Title:    Reclass of facies in howe ( howe_surf_sum )           |
 |-----------------------------------------------------------------|
 |                                                                 |
 |   Type of Map:  reclass     Number of Categories: 11            |
 |   Data Type:    CELL                                            |
 |   Rows:         556                                             |
 |   Columns:      648                                             |
 |   Total Cells:  360288                                          |
 |        Projection: Latitude-Longitude (zone 0)                  |
 |            N:     37:15S    S:     37:21S   Res: 0:00:00.647482 |
 |            E: 150:17:24E    W: 150:08:24E   Res: 0:00:00.833333 |
 |   Range of data:    min =  0 max = 11                           |
 |                                                                 |
 |   Data Source:                                                  |
 |    Reclassified map based on:                                   |
 |      Map [facies] in mapset [howe]                              |
 |                                                                 |
 |   Data Description:                                             |
 |    generated by r.reclass                                       |
 |                                                                 |
 |                                                                 |
 |-----------------------------------------------------------------|
 |   Reclassification of [facies] in mapset [howe]                 |
 |                                                                 |
 |         Category        Original categories                     |
 |                                                                 |
 |      -2147483648              1-10                              |
 |      -2147483647                                                |
 |      -2147483646                                                |


and goes on for a looong time.

r.statistics method=mode,median,avedev,stddev,variance,skewness, or 
kurtosis seem to give meaningful results for some data sets, but not 
for others. So I'm not happy about trusting any results.

In particular where the raster is an aspect map generated by 
r.slope.aspect the statistics for all classes seems to be identical.

Should I abandon r.statistics?

Regards
Gordon
-- 

Gordon Keith
Programmer/Data Analyst
Marine Acoustics
CSIRO Marine Research
http://www.marine.csiro.au

"I have traveled the length and breadth of this country and have 
talked with the best people, and I can assure you that 
data processing is a fad that won't last out the year."
- The editor in charge of business books for Prentice-Hall, 1957



More information about the grass-user mailing list