NAME

v.to.rast - Converts a binary GRASS vector map layer into a GRASS raster map layer.
(GRASS Vector Program)

SYNOPSIS

v.to.rast
v.to.rast help
v.to.rast input=name output=name

DESCRIPTION

v.to.rast transforms (binary) GRASS vector map layers into GRASS raster map layer format. Most GRASS analysis programs operate on raster data.

OPTIONS

Parameters:

input=name
Name of the binary vector map layer to be converted.
output=name
Name to be assigned to the raster map layer output.

The user can run the program non-interactively by specifying the names of a vector input file and raster output file on the command line, using the form:

v.to.rast input=name output=name
If the user instead types simply v.to.rast on the command line, the program will prompt the user to enter these names.

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; the program may otherwise create an empty raster map layer.

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 either v.alabel, v.llabel, or v.digit).

Depending on what type of vector features are labeled, the output changes:

  • If no features are labeled, the resulting raster map will be blank.
  • Labeled lines will produce raster lines which straddle the original line.
  • Labeled areas will produce filled raster coverages with edges that straddle the original boundary.
  • A vector with both labeled lines and areas (for example if v.alabel and v.llabel were run on the same file) will produce a convex-hull of the original area, which will hug the outside edge of the vector area. This is NOT the same as combining the result from v.to.rast with labeled lines and v.to.rast with labeled areas!

    The v.to.rast program creates two files: a raster map layer, and a history file. The GRASS program r.support must be run to create additional support files for the raster map.

    BUGS

    Additional problems sometimes lead to the creation of empty raster map layers. Unfortunately, error messages explaining these phenomena do not yet exist. If you find such a case, please let the GRASS development team know so it can be fixed.

    SEE ALSO

    g.region, r.poly, r.line, r.support, v.alabel, v.digit, v.import, v.llabel, v.support

    AUTHORS

    Michael Shapiro, U.S. Army Construction Engineering Research Laboratory

    Last changed: $Date$