NAME

r.poly - Extracts area edges from a raster map layer and converts data to GRASS vector format.
(GRASS Raster Program)

SYNOPSIS

r.poly
r.poly help
r.poly [-l] input=name output=name

DESCRIPTION

r.poly scans the named input raster map layer, extracts area edge features from it, converts data to GRASS vector format, and smoothes vectors.

r.poly first traces the perimeter of each unique area in the raster map layer and creates vector data to represent it. The cell category values for the raster map layer will be used to create attribute information for the resultant vector area edge data.

A true vector tracing of the area edges might appear blocky, since the vectors outline the edges of raster data that are stored in rectangular cells. To produce a better-looking vector map, r.poly smoothes the corners of the vector data as they are being extracted. At each change in direction (i.e., each corner), the two midpoints of the corner cell (half the cell's height and width) are taken, and the line segment connecting them is used to outline this corner in the resultant vector file. (The cell's cornermost node is ignored.) Because vectors are smoothed by this program, the resulting vector map will not be "true" to the raster map from which it was created. The user should check the resolution of the geographic region (and the original data) to estimate the possible error introduced by smoothing.

OPTIONS

The user can run this program either non-interactively or interactively. The program will be run non-interactively if the user specifies program arguments and flag settings on the command line using the form:
r.poly [-l] input=name output=name
Alternately, the user can simply type r.poly on the command line without program arguments. In this case, the user will be prompted for parameter values and flag settings using the standard GRASS parser interface.

Flag:

-l
Smooth corners.

Parameters:

input=name
Use the existing raster map name as input.
output=name
Set the new vector output file name to name.

NOTES

r.poly extracts only area edges from the named raster input file. If the raster file contains other data (i.e., line edges, or point data) the output may be wrong.

The user must run v.support on the resultant file to build the needed topology information stored in the dig_plus file.

SEE ALSO

v.support
parser

AUTHOR

Original version of r.poly:
Jean Ezell and Andrew Heekin,
U.S. Army Construction Engineering Research Laboratory

Modified program for smoothed lines:
David Satnik, Central Washington University