NAME
v.extract - Selects vector objects from an existing vector map
and creates a new map containing only the selected objects.
(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 file name, and the
type of input object. 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 numbers or labels.
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 labels NOT category numbers.
Parameters:
type=name
Select area, area edge, line, or site.
Options: area, edge, line, site
input=name
Input vector map name.
output=name
Output vector map name.
new=value
Enter 0 (keep original category) or a desired NEW category number.
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 numbers of 1 thru 4; any
common boundaries are dissolved, and all areas of the new map will be
assigned category number 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 labels of Abc,Def1, 12A,WWd;
these labels correspond to numbers 1 thru 4 of soils. Any common
boundaries are dissolved, all areas of the new map will be retain their
original category numbers 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 number 1. The "labels" (-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
Last changed: $Date: 2002/04/13 14:51:50 $