## NAME

v.to.rast - Converts a binary GRASS vector map layer into a GRASS raster map layer.

## SYNOPSIS

v.to.rast
v.to.rast help
v.to.rast input=string [layer=integer] output=string [use=string] [column=string] [value=float] [rows=integer]

### Parameters:

input=string
  vector input file
layer=integer
  Layer number
  Default: 1
output=string
  raster output file
use=string
  Source of raster values:
  attr - read values from attribute table
  cat - use category values
  val - use value specified by value option
  z - use z coordinate (points or contours only)
  Options: attr,cat,val,z
  Default: attr
column=string
  Column name
value=float
  Raster value
  Default: 1
rows=integer
  number of rows to hold in memory
  Default: 4096

## DESCRIPTION

v.to.rast transforms GRASS vector map layers into GRASS raster map layer format.

## NOTES

v.to.rast will only affect data in areas lying inside the boundaries of the current geographic region. Before running v.to.rast, the user should therefore ensure that the current geographic region is correctly set and that the region resolution is at the desired level.

Either the col parameter or the value parameter must be specified.

The col parameter uses an existing column from the vector map database table as the category value in the output raster map. Existing table columns can be shown by using db.describe.

An empty raster map layer will be created if the vector map layer has not been assigned category/attribute labels (e.g., through use of v.category option=add).

Otherwise:

- Labeled areas and/or centroids will produce filled raster coverages with edges that straddle the original area boundary as long as the boundary is NOT labeled.
  (Use `v.category option=del type=boundary` to remove.)
- Labeled lines and boundaries will produce lines of raster cells which touch the original vector line. This tends to be more aggressive than area-only conversions.
- Points and orphaned centroids will be converted into single cells on the resultant raster map.

  ## EXAMPLE

  Convert a vector map and use column SPEED from attribute table
  db.describe -c table=vect_map

      ncols:3
      Column 1: CAT
      Column 2: SPEED
      Column 3: WIDTH

  v.to.rast in=vect_map out=raster_map col=SPEED

  ## AUTHORS

  Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
  Radim Blazek, ITC-Irst, Trento, Italy

  Last changed: $Date: 2004/06/01 03:56:02 $

  Help Index