GRASS logo

Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.

NAME - Create raster maps for multiple numeric attribute columns of a vector map


vector, conversion, raster, rasterization, reclassify, multiple

SYNOPSIS --help [-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]


Create densified lines (default: thin lines)
All cells touched by the line will be set, not only those on the render path
Allow output files to overwrite existing files
Print usage summary
Verbose module output
Quiet module output
Force launching GUI dialog


input=name [required]
Name of input vector map
Or data source for direct OGR access
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
Input feature type
Options: point, line, boundary, centroid, area
Default: point,line,area
Category values
Example: 1,3,7-9,13
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)
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 used for parsing attribute table (it should not occur in any selected column)
Default: pipe

Table of contents

DESCRIPTION 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 and most of the options from that module are available. works as follows: First, (only) the key column is rasterized with 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 --o --v input=census_wake2000 type=area \
output=vrastmulti attribute_columns="RINGS_OK,TRACT" \
label_columns="ID,TRACTID" memory=3000 ndigits="0,4" separator=","

SEE ALSO, r.reclass


Stefan Blumentrath, Norwegian Institute for Nature Research (NINA)


Available at: source code (history)

Latest change: Sunday Jan 14 22:40:57 2024 in commit: 1a3fc98cd985fa4ec17508c11781b66504ea7079

Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.

Main index | Vector index | Topics index | Keywords index | Graphical index | Full index

© 2003-2023 GRASS Development Team, GRASS GIS 8.2.2dev Reference Manual