
NAME
v.overlay - Overlays two vector maps.
KEYWORDS
vector, geometry
SYNOPSIS
v.overlay
v.overlay help
v.overlay [-t] ainput=name [atype=string[,string,...]] [alayer=integer] binput=name [btype=string[,string,...]] [blayer=integer] output=name [operator=string] [olayer=integer[,integer,...]] [--overwrite] [--verbose] [--quiet]
Flags:
- -t
- Do not create attribute table
- --overwrite
- Allow output files to overwrite existing files
- --verbose
- Verbose module output
- --quiet
- Quiet module output
Parameters:
- ainput=name
- Name of input vector map (A)
- atype=string[,string,...]
- Feature type (vector map A)
- Feature type
- Options: line,area
- Default: area
- alayer=integer
- Layer number (vector map A)
- A single vector map can be connected to multiple database tables. This number determines which table to use.
- Default: 1
- binput=name
- Name of input vector map (B)
- btype=string[,string,...]
- Feature type (vector map B)
- Feature type
- Options: area
- Default: area
- blayer=integer
- Layer number (vector map B)
- A single vector map can be connected to multiple database tables. This number determines which table to use.
- Default: 1
- output=name
- Name for output vector map
- operator=string
- Operator defines features written to output vector map
- Feature is written to output if the result of operation 'ainput operator binput' is true. Input feature is considered to be true, if category of given layer is defined.
- Options: and,or,not,xor
- Default: or
- and: also known as 'intersection' in GIS
- or: also known as 'union' in GIS (only for atype=area)
- not: features from ainput not overlayed by features from binput
- xor: features from either ainput or binput but not those from ainput overlayed by binput (only for atype=area)
- olayer=integer[,integer,...]
- Output layer for new category, ainput and binput
- If 0 or not given, the category is not written
- Default: 1,0,0
DESCRIPTION
v.overlay allows the user to overlay two vector area maps.
The resulting output map has a merged attribute-table. The origin column-names
have a prefix (a_ and b_) which results from the ainput- and binput-map.
NOTES
Currently only areas are supported for the operators or and xor! See also v.select.
The operator defines what kind of operation will be done. Features are written to output,
if the result of an operation 'ainput operator binput' is true.
Attributes of the tables from ainput and binput are joined into a new table
linked to the output maps new cat-column.
EXAMPLE POLYGON TO POLYGON UNION
v.overlay ainput=lake binput=province output=lakeXprovince operator=or
EXAMPLE POLYGON TO POLYGON UNION
Polygon union of urban area and Census 2000 areas (North Carolina dataset):
# input maps
d.vect urbanarea
d.vect census_wake2000
# union
v.overlay ain=census_wake2000 bin=urbanarea out=urban_census2000 operator=or
# show result, graphically zooming a subset
g.region n=230400 s=223800 w=655800 e=662400
d.erase
d.vect urban_census2000
# show merged attribute table
v.db.select urban_census2000 where="cat=108" -v
cat|108
a_cat|98
a_AREA|231001264
a_PERIMETE|67804.305
a_TRACT_|98
a_TRACT_ID|98
a_RINGS_OK|1
a_RINGS_NO|0
a_ID|98
a_FIPSSTCO|37183
a_TRT2000|054108
a_STFID|37183054108
a_TRACTID|541.08
a_TRACT|541.08
b_cat|55
b_OBJECTID|55
b_UA|73261
b_NAME|Raleigh
b_UA_TYPE|UA
v.overlay: Polygon union of urban area and Census 2000 areas (North Carolina dataset)
EXAMPLE LINE TO POLYGON CLIPPING
Using the North Carolina sample dataset, we clip the roads map to the area
of city of Raleigh:
g.region vect=zipcodes_wake
# extract Raleigh city
v.extract in=zipcodes_wake out=raleigh \
where="ZIPNAME = 'RALEIGH'"
# clip road network to city polygon:
v.overlay ainput=roadsmajor atype=line binput=raleigh \
out=roadsmajor_raleigh operator=and

|
v.overlay: Line to polygon clipping
|
SEE ALSO
v.db.connect,
v.select,
g.copy
AUTHORS
Radim Blazek, ITC-Irst, Trento, Italy
Last changed: $Date: 2012-09-16 02:52:34 -0700 (Sun, 16 Sep 2012) $
Main index - vector index - Full index
© 2003-2012 GRASS Development Team