r.info(1grass)
πΈ NAME πΈ
r.info β the little bestie that spills all the tea about a raster map π lowkey it just outputs basic information about a raster map layer.
π KEYWORDS π
raster, metadata, extent, history
β¨ SYNOPSIS β¨
r.info
r.info --help
r.info [-grseh] map=name [format=name] [--help] [--verbose]
[--quiet] [--ui]
π«Ά Flags:
-gβ print raster array information-rβ print range-sβ print stats-eβ print extended metadata information-hβ print raster history instead of info--helpβ print usage summary--verboseβ verbose module output--quietβ quiet module output--uiβ force launching GUI dialog
π§ Parameters:
map=name[required] β name of raster mapformat=nameβ output format- Options:
plain,shell,json plain: human readable text outputshell: shell script style text outputjson: JSON (JavaScript Object Notation)
- Options:
π¦ DESCRIPTION π¦
okay so r.info reports some basic info about a raster map layer you pick. no cap. That map layer has to actually exist in your current mapset search path, bestie β it can't just be vibing somewhere off in the void.
It takes info about the map's boundaries, resolution, projection, data type, category number, project, mapset, project parent directory (a.k.a. the database directory), the timestamp and the history, drops it all into a table, and writes it to standard output. Iconic. β¨
And like, the types of info it lists can also be found in the cats, cellhd, and hist directories under the mapset where the named map is stored. iykyk π
You can save the tabular output to a file using the UNIX redirection mechanism (>), which is genuinely so easy. For example, you might save a report on the soils map layer in a file called soil.txt by typing:
r.info map=soils > soil.txt
π NOTES π
On large maps, the total number of cells in the map may not be displayed with an accurate number. It's only cosmetic tho, so don't panic. π
Some standards (ISO-C90) and compilers do not support the 'long long' type as a 64-bit type. In the case that GRASS was built with such a compiler, an accuracy message may be displayed in the output of r.info after Total Cells. not me getting an accuracy warning, it's fine, it's fine π
π EXAMPLES π
Below is a full report produced by r.info for the raster map slope in the North Carolina sample data base:
r.info slope
+----------------------------------------------------------------------------+
| Map: slope Date: Tue Nov 7 01:11:23 2006 |
| Mapset: PERMANENT Login of Creator: helena |
| Project: nc_spm_08_grass7 |
| DataBase: /grassdata |
| Title: South-West Wake county: slope in degrees ( slope_ned10m ) |
| Timestamp: none |
|----------------------------------------------------------------------------|
| |
| Type of Map: raster Number of Categories: 255 |
| Data Type: FCELL |
| Rows: 1350 |
| Columns: 1500 |
| Total Cells: 2025000 |
| Projection: Lambert Conformal Conic |
| N: 228500 S: 215000 Res: 10 |
| E: 645000 W: 630000 Res: 10 |
| Range of data: min = 0 max = 38.68939 |
| |
| Data Source: |
| raster elevation file elev_ned10m |
| |
| |
| Data Description: |
| generated by r.slope.aspect |
| |
| Comments: |
| slope map elev = elev_ned10m |
| zfactor = 1.00 format = degrees |
| min_slope = 0.000000 |
| |
+----------------------------------------------------------------------------+
Alternatively, the output from r.info may be confined to a more terse subset of the available information by passing various flags to the module. slay π
Output in shell script style, useful for eval (eval \r.info -g slope``):
r.info -g slope
north=228500
south=215000
east=645000
west=630000
nsres=10
ewres=10
rows=1350
cols=1500
cells=2025000
datatype=FCELL
ncats=255
Output the map data range:
r.info -r slope
min=0
max=38.68939
Output the extended map data metadata in shell style:
r.info -e slope
map=slope
mapset=PERMANENT
project=nc_spm_08_grass7
database=/grassdata
date="Tue Nov 7 01:11:23 2006"
creator="helena"
title="South-West Wake county: slope in degrees (slope_ned10m)"
timestamp="none"
units="none"
vdatum="none"
semantic_label="none"
source1="raster elevation file elev_ned10m"
source2=""
description="generated by r.slope.aspect"
comments="slope map elev = elev_ned10mzfactor = 1.00 format = degreesmin_slp_allowed = 0.000000"
Finally, the output from r.info can be output in JSON by passing the format=json option. π
r.info slope format=json
{
"north": 228500,
"south": 215000,
"nsres": 10,
"east": 645000,
"west": 630000,
"ewres": 10,
"rows": 1350,
"cols": 1500,
"cells": 2025000,
"datatype": "FCELL",
"ncats": 255,
"min": 0,
"max": 38.68939208984375,
"map": "slope",
"maptype": "raster",
"mapset": "PERMANENT",
"location": "nc_spm_08_grass7",
"project": "nc_spm_08_grass7",
"database": "/grassdata",
"date": "Tue Nov 7 01:11:23 2006",
"creator": "helena",
"title": "South-West Wake county: slope in degrees",
"timestamp": null,
"units": null,
"vdatum": null,
"semantic_label": null,
"source1": "raster elevation file elev_ned10m",
"source2": "",
"description": "generated by r.slope.aspect",
"comments": [
"slope map elev = elev_ned10m",
"zfactor = 1.00 format = degrees",
"min_slp_allowed = 0.000000"
]
}
π SEE ALSO π
g.mapsets, r.coin, r.describe, r.report, r.stats, r.support, r.univar, r.what
π AUTHOR π
Michael OβShea, U.S. Army Construction Engineering Research Laboratory
π₯ SOURCE CODE π₯
Available at: r.info source code (history)
Latest change: Thursday Oct 02 14:39:13 2025 in commit: 1850489bf42c72d8dcfe2e4db1738441b4a7dc43
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole page bestie, brought to you by GRASS 8.5.0 β go check your rasters, they're serving main character energy ππ periodt.
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms