NAME

v.extract - Selects vectors from an existing vector map and creates a new map containing only the selected vectors.
(SCS GRASS Vector Program)

SYNOPSIS

v.extract
v.extract help
v.extract[ -dn] type=name input=name output=name new=value [list=range] [file=name]

DESCRIPTION

v.extract allows a user to create a new vector map layer from an existing vector map layer. User provides the program with category numbers or option (n) names, input vector file name, an output vector name, and the type of input map. There is an option (d) to dissolve common boundaries between adjoining map areas in the same category list. The user may specify a file containing category values or names.

Note:

The dissolve option will work on only those areas which are in the given category list. If a map area is inside (island) a listed category area and is NOT in the given category list, its boundaries are output to the resultant map.

COMMAND LINE OPTIONS

Flags:

-d
Dissolve common boundaries (default is no) .
-n
Use category names NOT category values.

Parameters:

type=name
Select area, line, or site.
Options: area, line, site
input=name
Input vector map name.
output=name
Output vector map name.
new=value
Enter 0 or a desired NEW category value.
list=range
Category ranges.
For example: 1, 3-8, 13
For example: Abc, Def2, XyZ
file=name
Text file name for category range/list .

EXAMPLE

v.extract -d list=1,2,3,4 input=soils output=soil_groupa type=area new=1

Produces a new vector area file soil_groupa containing 'area' boundaries from soils with area category values of 1 thru 4; any common boundaries are dissolved, and all areas of the new map will be assigned category value 1.

v.extract -dn list=Abc,Def1,12A,WWd input=soils output=soil_groupa type=area new=0

Produces a new vector area file soil_groupa containing 'area' boundaries from soils with area category names of Abc,Def1, 12A,WWd; these names correspond to values 1 thru 4 of soils. Any common boundaries are dissolved, all areas of the new map will be retain their original category values 1 thru 4, in this case, since new was set to 0.

v.extract -n input=soils output=soil_groupa type=area new=1 file=sample

Produces a new vector area file soil_groupa containing 'area' boundaries from soils. No common boundaries are dissolved, all areas of the new map will be assigned category value 1. The "names" (-n option) can be found in the file sample of the current directory.

The format for "sample" is:

Abc
Def1
12A
WWd

AUTHOR

R.L. Glenn, USDA, SCS, NHQ-CGIS