NAME
v.to.rast.multi - Create raster maps for multiple numeric attribute columns of a vector map
KEYWORDS
vector,
conversion,
raster,
rasterization,
reclassify,
multiple
SYNOPSIS
v.to.rast.multi
v.to.rast.multi --help
v.to.rast.multi [-d] input=name [layer=string] [type=string[,string,...]] [cats=range] [where=sql_query] output=prefix key_column=name attribute_columns=names[,names,...] [label_columns=names[,names,...]] [memory=memory in MB] [ndigits=number of digits[,number of digits,...]] [separator=Separator] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
Flags:
- -d
- Create densified lines (default: thin lines)
- All cells touched by the line will be set, not only those on the render path
- --overwrite
- Allow output files to overwrite existing files
- --help
- Print usage summary
- --verbose
- Verbose module output
- --quiet
- Quiet module output
- --ui
- Force launching GUI dialog
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
- type=string[,string,...]
- Input feature type
- Options: point, line, boundary, centroid, area
- Default: point,line,area
- cats=range
- Category values
- Example: 1,3,7-9,13
- where=sql_query
- WHERE conditions of SQL statement without 'where' keyword
- Example: income < 1000 and population >= 10000
- output=prefix [required]
- Prefix for output raster maps
- key_column=name [required]
- Name of the key column (default: cat, data type must be integer)
- Default: cat
- attribute_columns=names[,names,...] [required]
- Names of columns for 'attr' parameter (data type must be numeric)
- label_columns=names[,names,...]
- Names of columns used as raster category labels
- memory=memory in MB
- Maximum memory to be used (in MB)
- Cache size for raster rows
- Default: 300
- ndigits=number of digits[,number of digits,...]
- Number of significant digits per attribute column
- Number of significant digits per attribute column (for columns with floating point data)
- separator=Separator
- Separator used for parsing attribute table (it should not occur in any selected column)
- Default: pipe
v.to.rast.multi creates a raster map for each selected numeric column
of the attribute table of a vector map. The purpose is to provide a simple and
efficient way to rasterize different attributes of vector maps with multiple
numeric value columns.
It is a simple wrapper around v.to.rast and most of the options from
that module are available. v.to.rast.multi works as follows: First,
(only) the key column is rasterized with v.to.rast. Then reclassification
rules are generated for all selected attribute columns and the key_column
and reclass maps are created with r.reclass.
Because r.relass only handles integer data and rounds data with
floating point precision, the number of significant digits to preserve during
reclassification can be defined with the ndigits option. Also text labels
can be provided in the label_columns option.
If the label_columns or ndigits are given, the number and order of
provided values has to correspond to the number and order of the selected
attribute_columns.
This example is based on the North Carolina sample location (nc_spm_08_grass7) which
can be downloaded from the
GRASS GIS website.
# Create raster maps for RINGS_OK amd TRACT attribute of the census_wake2000 map
# Note: RINGS_OK is of type integer, so 0 digits need to be preserved
v.to.rast.multi --o --v input=census_wake2000 type=area \
output=vrastmulti attribute_columns="RINGS_OK,TRACT" \
label_columns="ID,TRACTID" memory=3000 ndigits="0,4" separator=","
v.to.rast,
r.reclass
Stefan Blumentrath, Norwegian Institute for Nature Research (NINA)
SOURCE CODE
Available at:
v.to.rast.multi source code
(history)
Latest change: Sunday Jan 14 22:40:57 2024 in commit: 1a3fc98cd985fa4ec17508c11781b66504ea7079
Main index |
Vector index |
Topics index |
Keywords index |
Graphical index |
Full index
© 2003-2024
GRASS Development Team,
GRASS GIS 8.3.3dev Reference Manual