v.tin.to.rast
Converts (rasterize) a TIN map into a raster map
v.tin.to.rast input=name output=name [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
v.tin.to.rast input=name output=name
grass.script.run_command("v.tin.to.rast", input, output, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
gs.run_command("v.tin.to.rast", input="name", output="name")
grass.tools.Tools.v_tin_to_rast(input, output, overwrite=None, verbose=None, quiet=None, superquiet=None)
Example:
tools = Tools()
tools.v_tin_to_rast(input="name", output="name")
This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.
Parameters
input=name [required]
Name of input TIN map
Name of input TIN map
output=name [required]
Name for output raster 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, required
Name of input TIN map
Name of input TIN map
Used as: input, vector, name
output : str, required
Name for output raster map
Used as: output, raster, name
overwrite : bool, optional
Allow output files to overwrite existing files
Default: None
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
input : str, required
Name of input TIN map
Name of input TIN map
Used as: input, vector, name
output : str | type(np.ndarray) | type(np.array) | type(gs.array.array), required
Name for output raster map
Used as: output, raster, name
overwrite : bool, optional
Allow output files to overwrite existing files
Default: None
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
Returns:
result : grass.tools.support.ToolResult | np.ndarray | tuple[np.ndarray] | None
If the tool produces text as standard output, a ToolResult object will be returned. Otherwise, None
will be returned. If an array type (e.g., np.ndarray) is used for one of the raster outputs, the result will be an array and will have the shape corresponding to the computational region. If an array type is used for more than one raster output, the result will be a tuple of arrays.
DESCRIPTION
v.tin.to.rast converts (rasterizes) a TIN map into a raster map.
EXAMPLE
Example of v.tin.to.rast usage (North Carolina sample data set). Preparation of a TIN (Delaunay triangulation) from geodetic points, then rasterization of the TIN:
# work on a copy of the original geodetic points map
g.copy vector=geodetic_pts,mygeodetic_pts
# data preparation: convert z-values from string to double format
v.db.addcolumn map=mygeodetic_pts columns="Z_VALUE_D double precision"
v.db.update map=mygeodetic_pts column=Z_VALUE_D qcolumn=Z_VALUE
# verify: should show identical z-values
v.db.select map=mygeodetic_pts columns=cat,Z_VALUE,Z_VALUE_D
# convert 2D vector point map to 3D based on attribute
v.to.3d input=mygeodetic_pts output=mygeodetic_pts_3d column=Z_VALUE_D
# create TIN
v.delaunay input=mygeodetic_pts_3d output=mygeodetic_pts_3d_delaunay
# rasterize TIN to 500m resolution raster map
g.region vector=mygeodetic_pts_3d_delaunay res=500 -p
v.tin.to.rast input=mygeodetic_pts_3d_delaunay output=mygeodetic_pts_3d_delaunay
r.colors mygeodetic_pts_3d_delaunay color=srtm_plus
SEE ALSO
AUTHORS
Antonio Alliegro, Alexander Muriy
Example: Markus Neteler
SOURCE CODE
Available at: v.tin.to.rast source code
(history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819