r.to.rast3
Converts 2D raster map slices to one 3D raster volume map.
r.to.rast3 [-m] input=name [,name,...] output=name [tilesize=integer] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
r.to.rast3 input=name output=name
grass.script.run_command("r.to.rast3", input, output, tilesize=32, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("r.to.rast3", input="name", output="name")
Parameters
input=name [,name,...] [required]
2D raster maps which represent the slices
output=name [required]
Name for output 3D raster map
tilesize=integer
The maximum tile size in kilo bytes. Default is 32KB.
Default: 32
-m
Use 3D raster mask (if exists) with output map
--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 | list[str], required
2D raster maps which represent the slices
Used as: input, raster, name
output : str, required
Name for output 3D raster map
Used as: output, raster_3d, name
tilesize : int, optional
The maximum tile size in kilo bytes. Default is 32KB.
Default: 32
flags : str, optional
Allowed values: m
m
Use 3D raster mask (if exists) with output map
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
r.to.rast3 converts 2D raster map(s) into one raster3D map. It is important to properly set the 3D region settings, especially number or layers and depth of layers. If the 2D and 3D region settings are different, the 2D resolution will be adjusted to the 3D resolution.
NOTES
Every 2D raster map is copied as one slice to the raster3D map. Slices are counted from bottom to the top, so the bottom slice has to be number 1.
If less number of 2D raster maps are provided than defined depths, the last given 2D map is used to fill up the remaining raster3D slices to the top.
EXAMPLES
EXAMPLE 1
This example shows how to convert 6 maps into one 3D map with 6 layers.
# Mapset data in dataset slovakia3d
g.region raster=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 -p
g.region b=0 t=600 tbres=100 res3=100 -p3
r.to.rast3 input=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 output=new_3dmap
EXAMPLE 2
This example shows how to convert 3 maps into one 3D map with 6 layers.
# Mapset data in dataset slovakia3d
g.region b=0 t=600 tbres=100 res3=100 -p3
r.to.rast3 input=prec_1,prec_2,prec_3 output=new_3dmap
SEE ALSO
g.region, r3.to.rast, r.to.rast3elev
AUTHOR
Soeren Gebbert
SOURCE CODE
Available at: r.to.rast3 source code
(history)
Latest change: Tuesday Feb 18 17:20:26 2025 in commit 688e625