man v.extract () - Selects vector objects from an existing vector map and creates a new map containing only the selected objects. If 'list', 'file' and 'where' options are not specified, all features of given type and layer are extracted, categories are not changed in that case.

NAME

v.extract - Selects vector objects from an existing vector map and creates a new map containing only the selected objects. If 'list', 'file' and 'where' options are not specified, all features of given type and layer are extracted, categories are not changed in that case.

SYNOPSIS

v.extract

v.extract help

v.extract [-dt] input=string output=string [type=string[,string,...]] [layer=integer] [new=integer] [list=range[,range,...]] [file=string] [where=string]

Flags:

"-d
Dissolve common boundaries (default is no)
"-t
Do not copy table (see also 'new' parameter)

Parameters:

"input=string
Name of input vector
"output=string
Name of output vector
"type=string[,string,...]
Type Options: point,line,boundary,centroid,area,face Default: point,line,boundary,centroid,area,face
"layer=integer
Layer number. If -1, all features in all layers of given type are extracted Default: 1
"new=integer
Enter -1 to keep original category or a desired NEW category value. If new >= 0, table is not copied. Default: -1
"list=range[,range,...]
Category ranges: e.g. 1,3-8,13
"file=string
Text file with category numbers/number ranges
"where=string
WHERE conditions of SQL statement without 'where' keyword. (example: income = 10000)

DESCRIPTION

v.extract allows a user to select vector objects from an existing vector map and creates a new map containing only the selected objects. Database tables can be queried with SQL statements, if a connection is established. Dissolving (optional) is based on the output categories. If 2 adjacent areas have the same output category, the boundary is removed.

EXAMPLES

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.

"

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.

"

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.

"

Produces a new vector map with category label 1 if the SQL statement is fulfilled.

SEE ALSO

GRASS SQL interface

AUTHOR

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

Last changed: $Date: 2005/02/13 22:38:03 $

Help Index