## DESCRIPTION

*r3.info* reports metadata and range of 3D voxel maps.

## NOTES

For backward compatibility, using the **-g**, **-r** flags without specifying
a **format** currently defaults to the **shell** format. In the next major
release, this behavior may change to default to the **plain** format to better
support interactive use. To ensure consistent behavior in scripts, explicitly
specify the  **shell** or **json** format.

<!-- markdownlint-disable MD046 -->
## EXAMPLES

### Get full report

Below is the full report produced by *r3.info* for the raster3d map "volume",
created using `r3.mapcalc expression="volume = row() + col() + depth()"`:

=== "Command line"

    ```sh
    r3.info volume
    ```

    Possible output:

    ```text
    +----------------------------------------------------------------------------+
    | Map:      volume                         Date: Mon Jul 21 23:14:24 2025    |
    | Mapset:   PERMANENT                      Login of Creator: nishantbansal   |
    | Project: nc_spm_08_grass7                                                  |
    | DataBase: /grassdata                                                       |
    | Title:    volume                                                           |
    | Units:    none                                                             |
    | Vertical unit: units                                                       |
    | Timestamp: none                                                            |
    |----------------------------------------------------------------------------|
    |                                                                            |
    |   Type of Map:  raster_3d            Number of Categories: 0               |
    |   Data Type:    DCELL                                                      |
    |   Rows:         100                                                        |
    |   Columns:      200                                                        |
    |   Depths:       50                                                         |
    |   Total Cells:  1000000                                                    |
    |   Total size:           147591 Bytes                                       |
    |   Number of tiles:      294                                                |
    |   Mean tile size:       502 Bytes                                          |
    |   Tile size in memory:  31320 Bytes                                        |
    |   Number of tiles in x, y and  z:   7, 7, 6                                |
    |   Dimension of a tile in x, y, z:   29, 15, 9                              |
    |                                                                            |
    |        Projection: Lambert Conformal Conic (zone 0)                        |
    |            N:        200    S:        100   Res:     1                     |
    |            E:        400    W:        200   Res:     1                     |
    |            T:        500    B:        450   Res:     1                     |
    |   Range of data:   min =          3 max =        350                       |
    |                                                                            |
    |   Data Source:                                                             |
    |                                                                            |
    |                                                                            |
    |                                                                            |
    |   Data Description:                                                        |
    |    generated by r3.mapcalc                                                 |
    |                                                                            |
    |   Comments:                                                                |
    |    r3.mapcalc expression="volume = row() + col() + depth()" region="cur\   |
    |    rent"                                                                   |
    |                                                                            |
    +----------------------------------------------------------------------------+
    ```

=== "Python (grass.script)"

    ```python
    import grass.script as gs

    data = gs.parse_command("r3.info", map="volume", format="json")
    print(data["title"])
    ```

    Possible output:

    ```text
    volume
    ```

    The whole JSON may look like this:

    ```json
    {
        "map": "volume",
        "date": "Mon Jul 21 23:14:24 2025",
        "mapset": "PERMANENT",
        "creator": "nishantbansal",
        "project": "nc_spm_08_grass7",
        "database": "/grassdata",
        "title": "volume",
        "units": "none",
        "vertical_units": "units",
        "timestamp": null,
        "maptype": "raster_3d",
        "ncats": 0,
        "datatype": "DCELL",
        "rows": 100,
        "cols": 200,
        "depths": 50,
        "cells": 1000000,
        "size": 147591,
        "ntiles": 294,
        "meansize": 502,
        "tilesize": 31320,
        "tilenumx": 7,
        "tilenumy": 7,
        "tilenumz": 6,
        "tiledimx": 29,
        "tiledimy": 15,
        "tiledimz": 9,
        "north": 200,
        "south": 100,
        "nsres": 1,
        "east": 400,
        "west": 200,
        "ewres": 1,
        "top": 500,
        "bottom": 450,
        "tbres": 1,
        "min": 3,
        "max": 350,
        "source1": "",
        "source2": "",
        "description": "generated by r3.mapcalc",
        "comments": "r3.mapcalc expression=\"volume = row() + col() + depth()\" region=\"current\""
    }
    ```

Alternatively, the output from *r3.info* may be limited to a
subset of the available information by passing various flags to the
module:

### Get raster3d array information

=== "Command line"

    ```sh
    r3.info volume -g format=shell
    ```

    Possible output:

    ```text
    north=200
    south=100
    east=400
    west=200
    bottom=450
    top=500
    nsres=1
    ewres=1
    tbres=1
    rows=100
    cols=200
    depths=50
    datatype="DCELL"
    timestamp="none"
    units="none"
    vertical_units="units"
    tilenumx=7
    tilenumy=7
    tilenumz=6
    tiledimx=29
    tiledimy=15
    tiledimz=9
    ```

=== "Python (grass.script)"

    ```python
    import grass.script as gs

    data = gs.parse_command("r3.info", map="volume", flags="g", format="json")
    print(data)
    ```

    Possible output:

    ```text
    {'north': 200, 'south': 100, 'east': 400, 'west': 200, 'bottom': 450, 'top': 500, 'nsres': 1, 'ewres': 1, 'tbres': 1, 'rows': 100, 'cols': 200, 'depths': 50, 'datatype': 'DCELL', 'timestamp': None, 'units': 'none', 'vertical_units': 'units', 'tilenumx': 7, 'tilenumy': 7, 'tilenumz': 6, 'tiledimx': 29, 'tiledimy': 15, 'tiledimz': 9}
    ```

### Get the map data range

=== "Command line"

    ```sh
    r3.info -r volume format=shell
    ```

    Possible output:

    ```text
    min=3.000000
    max=350.000000
    ```

=== "Python (grass.script)"

    ```python
    import grass.script as gs

    data = gs.parse_command("r3.info", map="volume", flags="r", format="json")
    print(data)
    ```

    Possible output:

    ```text
    {'min': 3, 'max': 350}
    ```
<!-- markdownlint-restore -->

## SEE ALSO

*[r.info](r.info.md)*

## AUTHORS

Roman Waupotitsch, Michael Shapiro, Helena Mitasova, Bill Brown, Lubos
Mitas, Jaro Hofierka
