r.report(1)

πŸ’– r.report(1) β€” the GRASS GIS manual page, bestie edition πŸ’–

okay so like. this is r.report from the GRASS GIS User's Manual, and it is genuinely one of my faves because it takes your raster maps and just serves you statistics. beautiful. iconic. let's get into it 🫢


✨ NAME ✨

r.report β€” Reports statistics for raster maps.

🌸 KEYWORDS 🌸

raster, statistics


πŸ¦‹ SYNOPSIS πŸ¦‹

r.report
r.report --help
r.report [-hfenaci] map=name[,name,...]  [units=string[,string,...]]
[output=name]   [null_value=string]   [page_length=integer]
[page_width=integer]   [nsteps=integer]   [sort=string]   [--overwrite]
[--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags

  • -h β€” Suppress page headers
  • -f β€” Use formfeeds between pages
  • -e β€” Scientific format
  • -n β€” Do not report no data value
  • -a β€” Do not report cells where all maps have no data
  • -c β€” Report for cats floating-point ranges (floating-point maps only)
  • -i β€” Read floating-point map as integer (use map's quant rules)
  • --overwrite β€” Allow output files to overwrite existing files
  • --help β€” Print usage summary
  • --verbose β€” Verbose module output
  • --quiet β€” Quiet module output
  • --ui β€” Force launching GUI dialog

πŸ“ Parameters

  • map=name[,name,...] [required] β€” Name of raster map(s) to report on
  • units=string[,string,...] β€” Units to report
    • Options: miles, meters, kilometers, acres, hectares, cells, percent
    • Default: cells,percent
    • miles: area in square miles
    • meters: area in square meters
    • kilometers: area in square kilometers
    • acres: area in acres
    • hectares: area in hectares
    • cells: number of cells
    • percent: percent cover
  • output=name β€” Name for output file to hold the report
    • If no output file given report is printed to standard output
  • null_value=string β€” String representing NULL value
    • Default: *
  • page_length=integer β€” Page length
    • Default: 0
  • page_width=integer β€” Page width
    • Default: 79
  • nsteps=integer β€” Number of floating-point subranges to collect stats from
    • Default: 255
  • sort=string β€” Sort output statistics by cell counts
    • Default: sorted by categories or intervals
    • Options: asc, desc
    • asc: Sort by cell counts in ascending order
    • desc: Sort by cell counts in descending order

πŸ’… DESCRIPTION πŸ’…

so r.report lets you set up a whole lil series of report parameters, applies them to a raster map, and then makes you a report. and if you don't hand it an output parameter, it just prints that report straight to standard output. no cap ✨

the report itself has two parts, bestie: a header section and the main body. that's the whole vibe.

the header section identifies the raster map(s) β€” by map name and title β€” plus the project, the mapset, the report date, and the region of interest. and the area of interest gets described in two parts: your current geographic region is presented, and then the mask is presented too (if any is used). πŸ—ΊοΈ

the main body is anywhere from one to three tables, presenting the statistics for each category and the totals for each unit column. lowkey important: the statistics is always computed in the current geographical region. always. periodt.

and when you specify multiple raster maps (typically two), a cross-tabulation table gets computed for each combination of categories in those raster maps, formatted in a human-readable way. see the example, it's giving art 🎨


πŸ‘‘ NOTES πŸ‘‘

note that, unlike r.stats, r.report lets you pick the specific units of measure that the statistics get reported in. if you want computer-friendly data that's suitable for importing into a spreadsheet, use the r.stats module instead. and honestly? r.report is running r.stats in the background the whole time and reformatting the results to be more human-friendly. the way that it's just a glow-up on top of r.stats… iykyk πŸ’…


🌈 EXAMPLE 🌈

report sorted areas in square miles and acres for each category. no-data are not reported (see -n flag).

r.report -n map=geology_30m units=mi,a sort=desc
+-----------------------------------------------------------------------------+
|                         RASTER MAP CATEGORY REPORT                          |
|PROJECT: nc_spm_08_grass7                            Fri Dec  6 17:00:21 2013|
|-----------------------------------------------------------------------------|
|          north: 279073.97546639    east: 798143.31179672                    |
|REGION    south: 113673.97546639    west: 595143.31179672                    |
|          res:               200    res:              200                    |
|-----------------------------------------------------------------------------|
|MASK: none                                                                   |
|-----------------------------------------------------------------------------|
|MAP: South-West Wake county: geology derived from vector map (geology_30m in |
|-----------------------------------------------------------------------------|
|                 Category Information                  |    square|          |
|  #|description                                        |     miles|     acres|
|-----------------------------------------------------------------------------|
|217|CZfg . . . . . . . . . . . . . . . . . . . . . . . | 27.783911|17,781.703|
|270|CZig . . . . . . . . . . . . . . . . . . . . . . . | 26.162282|16,743.861|
|405|CZbg . . . . . . . . . . . . . . . . . . . . . . . |  9.698886|  6207.287|
|262|CZlg . . . . . . . . . . . . . . . . . . . . . . . |  7.629379|  4882.802|
|862|CZam . . . . . . . . . . . . . . . . . . . . . . . |  2.532830|  1621.011|
|910|CZbg . . . . . . . . . . . . . . . . . . . . . . . |  1.683405|  1077.379|
|583|CZve . . . . . . . . . . . . . . . . . . . . . . . |  0.972977|   622.706|
|921|Km . . . . . . . . . . . . . . . . . . . . . . . . |  0.463323|   296.526|
|766|CZg. . . . . . . . . . . . . . . . . . . . . . . . |  0.324326|   207.569|
|720|CZam . . . . . . . . . . . . . . . . . . . . . . . |  0.185329|   118.611|
|946|CZam . . . . . . . . . . . . . . . . . . . . . . . |  0.138997|    88.958|
|948|CZam . . . . . . . . . . . . . . . . . . . . . . . |  0.030888|    19.768|
|-----------------------------------------------------------------------------|
|TOTAL                                                  | 77.606534|49,668.182|
+-----------------------------------------------------------------------------+

report areas for each category of land use for each zipcode (included only part of the table):

r.report map=zipcodes@PERMANENT,landclass96@PERMANENT units=h,p
+-----------------------------------------------------------------------------+
|                         RASTER MAP CATEGORY REPORT                          |
|PROJECT: nc_spm_08_latest                            Tue Feb 11 10:10:46 2014|
|-----------------------------------------------------------------------------|
|          north: 228527.25    east: 644971                                   |
|REGION    south: 215018.25    west: 629980                                   |
|          res:        28.5    res:    28.5                                   |
|-----------------------------------------------------------------------------|
|MASK: none                                                                   |
|-----------------------------------------------------------------------------|
|MAPS: South West Wake: Zipcode areas derived from vector map (zipcodes@PERMAN|
|        South-West Wake county: Simplified landuse classes (landclass96@PERMA|
|-----------------------------------------------------------------------------|
|                   Category Information                    |          |   %  |
|    #|description                                          |  hectares| cover|
|-----------------------------------------------------------------------------|
|27511|CARY                                                 |  1053.813|  5.20|
|     |-----------------------------------------------------|----------|------|
|     |1|developed. . . . . . . . . . . . . . . . . . . . . |   197.214| 18.71|
|     |3|herbaceous . . . . . . . . . . . . . . . . . . . . |    25.017|  2.37|
|     |4|shrubland. . . . . . . . . . . . . . . . . . . . . |    58.563|  5.56|
|     |5|forest . . . . . . . . . . . . . . . . . . . . . . |   771.313| 73.19|
|     |6|water. . . . . . . . . . . . . . . . . . . . . . . |     1.625|  0.15|
|     |*|no data. . . . . . . . . . . . . . . . . . . . . . |     0.081|  0.01|
|-----------------------------------------------------------|----------|------|
|27513|CARY                                                 |   204.525|  1.01|
|     |-----------------------------------------------------|----------|------|
|     |1|developed. . . . . . . . . . . . . . . . . . . . . |    32.571| 15.93|
|     |3|herbaceous . . . . . . . . . . . . . . . . . . . . |     6.011|  2.94|
|     |4|shrubland. . . . . . . . . . . . . . . . . . . . . |    51.659| 25.26|
|     |5|forest . . . . . . . . . . . . . . . . . . . . . . |   114.284| 55.88|
|-----------------------------------------------------------|----------|------|
...
|-----------------------------------------------------------------------------|
|TOTAL                                                      |22,968.900|100.00|
+-----------------------------------------------------------------------------+

🧚 SEE ALSO 🧚

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


πŸ’œ AUTHORS πŸ’œ

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

Sort option by Martin Landa, Czech Technical University in Prague, 2013


⭐ SOURCE CODE ⭐

Available at: r.report source code (history)

Accessed: Saturday Jan 17 05:40:58 2026

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index


okay bestie that's the whole page, you ate that πŸ’– this was the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team, and the page got accessed on Saturday Jan 17 05:40:58 2026. slay. go run it. πŸŽ€βœ¨ GRASS 8.4.2 β€” r.report(1) β€” periodt πŸ‘‘
πŸ“¦ where this page comes from