Skip to content

r3.mkdspf

Creates a display file from an existing 3D raster map according to specified threshold levels.

r3.mkdspf [-qf] input=string dspf=name [levels=float [,float,...]] [min=float] [max=float] [step=float] [tnum=integer] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

r3.mkdspf input=string dspf=name

grass.script.run_command("r3.mkdspf", input, dspf, levels=None, min=None, max=None, step=None, tnum=7, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r3.mkdspf", input="string", dspf="name")

Parameters

input=string [required]
    Name of an existing 3D raster map
dspf=name [required]
    Name for output display file
levels=float [,float,...]
    List of thresholds for isosurfaces
min=float
    Minimum isosurface level
max=float
    Maximum isosurface level
step=float
    Positive increment between isosurface levels
tnum=integer
    Number of isosurface threshold levels
    Default: 7
-q
    Suppress progress report & min/max information
-f
    Use flat shading rather than gradient
--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

input : str, required
    Name of an existing 3D raster map
    Used as: input, 3d-raster
dspf : str, required
    Name for output display file
    Used as: output, file, name
levels : float | list[float] | str, optional
    List of thresholds for isosurfaces
min : float, optional
    Minimum isosurface level
max : float, optional
    Maximum isosurface level
step : float, optional
    Positive increment between isosurface levels
tnum : int, optional
    Number of isosurface threshold levels
    Default: 7
flags : str, optional
    Allowed values: q, f
    q
        Suppress progress report & min/max information
    f
        Use flat shading rather than gradient
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

Creates a display file from an existing grid3 file according to specified threshold levels. The display file is a display list of polygons that represent isosurfaces of the data volume. If specific levels are given, additional optional parameters are ignored. Min or max may be used alone or together to specify a sub-range of the data. The step parameter is given precedence over tnum.

Flags

-q
Suppress progress report & min/max information

-f
Use flat shading rather than gradient

Parameters

grid3
Name of an existing 3D raster map

dspf
Name of output display file

levels
List of thresholds for isosurfaces

min
Minimum isosurface level

max
Maximum isosurface level

step
Positive increment between isosurface levels

tnum
Number of isosurface threshold levels

Default: 7

NOTES

Currently the grid3 file must be in the user's mapset since the display files being created are specific to particular grid3 files and are contained in directories under them. We should create a mechanism where users may make display files from others' grid3 files without having to copy them to their mapset.

EXAMPLES

With grid3 data (phdata) in the range 3-7, we only want to see isosurface values for the range 4-6. Any of these commands will produce the same results:

r3.mkdspf phdata dspf=iso min=4.0 max=6.0 tnum=5
r3.mkdspf phdata dspf=iso levels=4.0,4.5,5.0,5.5,6.0
r3.mkdspf phdata dspf=iso min=4.0 max=6.0 step=0.5

AUTHOR

Bill Brown, bbrown@gis.uiuc.edu

SOURCE CODE

Available at: r3.mkdspf source code (history)
Latest change: Thursday May 08 20:58:05 2025 in commit 4144ba8