GRASS logo

Note: A new GRASS GIS stable version has been released: GRASS GIS 7. Go directly to the new manual page here

NAME

r.report - Reports statistics for raster map layers.

KEYWORDS

raster, statistics

SYNOPSIS

r.report
r.report help
r.report [-qhfenNCi] map=name[,name,...] [units=string[,string,...]] [null=string] [pl=integer] [pw=integer] [output=string] [nsteps=integer] [--verbose] [--quiet]

Flags:

-q
Quiet
-h
Suppress page headers
-f
Use formfeeds between pages
-e
Scientific format
-n
Filter out all no data cells
-N
Filter out cells where all maps have no data
-C
Report for cats fp ranges (fp maps only)
-i
Read fp map as integer (use map's quant rules)
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

map=name[,name,...]
Raster map(s) to report on
units=string[,string,...]
Units
Options: mi,me,k,a,h,c,p
mi: miles
me: meters
k: kilometers
a: acres
h: hectares
c: cell counts
p: percent cover
null=string
Character representing no data cell value
Default: *
pl=integer
Page length (default: 0 lines)
pw=integer
Page width (default: 79 characters)
output=string
Name of an output file to hold the report
nsteps=integer
Number of fp subranges to collect stats from
Default: 255

DESCRIPTION

r.report allows the user to set up a series of report parameters to be applied to a raster map layer, and creates a report. If invoked with command line arguments, the report will print out to the screen only. However, output may be redirected to a file or another program using the UNIX redirection mechanism. If invoked without command line arguments, the user is given the option of printing out each report and/or saving output to a file.

The report itself consists of two parts, a header section and the main body of the report.

The header section of the report identifies the raster map layer(s) (by map layer name and TITLE), location, mapset, report date, and the region of interest. The area of interest is described in two parts: the user's current geographic region is presented, and the mask is presented (if any is used).

The main body of the report consists of from one to three tables which present the statistics for each category and the totals for each unit column.

Note that, unlike r.stats, r.report allows the user to select the specific units of measure in which statistics will be reported.

Following is the result of a r.report run on the raster map layer geology (located in the Spearfish, SD sample data base), with the units expressed in square miles and acres. Here, r.report output is directed into the file report.file.

EXAMPLE:

r.report map=geology units=miles,acres > report.file
 ____________________________________________________________
|                 RASTER MAP CATEGORY REPORT                 |
| LOCATION: spearfish                      Fri Sep 2 09:20:09|
|____________________________________________________________|
|           north:   4928000.00   east:   609000.00          |
| REGION:   south:   4914000.00   west:   590000.00          |
|           res:         100.00   res:       100.00          |
|____________________________________________________________|
| MASK:     none                                             |
|____________________________________________________________|
| MAP:      geology in PERMANENT                             |
|____________________________________________________________|
|         Category Information     |    Acres       Square   |
|    #      description            |                Miles    |
|________|_________________________|_________________________|
|    0   |  no data                |     415.13|      0.65   |
|    1   |  metamorphic            |    2597.02|      4.06   |
|    2   |  transition             |      32.12|      0.05   |
|    3   |  igneous                |    8117.24|     12.68   |
|    4   |  sandstone              |   16691.60|     26.08   |
|    5   |  limestone              |   13681.93|     21.38   |
|    6   |  shale                  |   10304.07|     16.10   |
|    7   |  sandy shale            |    2517.95|      3.93   |
|    8   |  claysand               |    3229.60|      5.05   |
|    9   |  sand                   |    8141.95|     12.72   |
|__________________________________|___________|_____________|
|                 TOTAL            |   65728.60|    102.70   |
|__________________________________|___________|_____________|

NOTES

If the user runs r.report interactively and saves the report output in a file, this file will be placed into the user's current working directory.

If the user runs r.report non-interactively, report output can be saved by redirecting it to a file or a printer using the UNIX redirection mechanism.

To output computer-friendly data suitable for importing into a spreadsheet use the r.stats module. In fact r.report is running r.stats in the background and reformatting the results to be more human-friendly.

SEE ALSO

g.region, r.coin, r.describe, r.info, r.stats, r.univar

AUTHOR

Michael Shapiro, U.S. Army Construction Engineering Research Laboratory

Last changed: $Date: 2013-04-18 05:21:53 -0700 (Thu, 18 Apr 2013) $


Main index - raster index - Full index

© 2003-2016 GRASS Development Team