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$