Skip to content

v.to.rast3

Converts a vector map (only points) into a 3D raster map.

v.to.rast3 input=name [layer=string] output=name column=name [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

v.to.rast3 input=name output=name column=name

grass.script.run_command("v.to.rast3", input, layer="1", output, column, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("v.to.rast3", input="name", output="name", column="name")

Parameters

input=name [required]
    Name of input vector map
    Or data source for direct OGR access
layer=string
    Layer number or name
    Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
    Default: 1
output=name [required]
    Name for output 3D raster map
column=name [required]
    Name of attribute column (data type must be numeric)
--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 input vector map
    Or data source for direct OGR access
    Used as: input, vector, name
layer : str, optional
    Layer number or name
    Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
    Used as: input, layer
    Default: 1
output : str, required
    Name for output 3D raster map
    Used as: output, raster_3d, name
column : str, required
    Name of attribute column (data type must be numeric)
    Used as: input, dbcolumn, name
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

v.to.rast3 converts a GRASS 3D vector point map to a GRASS 3D raster map.

NOTES

When converting from a 3D vector point layer to a 3D raster map a vector point is converted into a single 3D raster cell (voxel) representing the location of the vector point. As 3D raster cell value the database attribute of the vector point is stored with floating point precision.

Result of the v.to.rast3 test
Fig: This screenshot shows the result of the v.to.rast3 test. Visualized are the cube of the GRASS region, the vector points as black dots and the voxel cells as wireframe model. Only cells with non-null values are shown.

SEE ALSO

g.region

AUTHORS

Original s.to.rast3: Jaro Hofierka, Geomodel s.r.o.
Updated by Radim Blazek

SOURCE CODE

Available at: v.to.rast3 source code (history)
Latest change: Tuesday Feb 25 14:08:58 2025 in commit 429a884