Note: This addon document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade your GRASS GIS installation, and read the current addon manual page.
NAME
v.neighborhoodmatrix - Exports the neighborhood matrix of polygons in a vector map
KEYWORDS
vector,
neighborhood matrix
SYNOPSIS
v.neighborhoodmatrix
v.neighborhoodmatrix --help
v.neighborhoodmatrix [-b] input=name [player=integer] [idcolumn=name] [output=name] [separator=character] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
Flags:
- -b
- create bidirectional matrix (same neighborhood relation repeated twice)
- --overwrite
- Allow output files to overwrite existing files
- --help
- Print usage summary
- --verbose
- Verbose module output
- --quiet
- Quiet module output
- --ui
- Force launching GUI dialog
Parameters:
- input=name [required]
- Name of input vector map
- Or data source for direct OGR access
- player=integer
- Layer in map where polygons are to be found
- Default: 1
- idcolumn=name
- Name of column containing polygon ids
- output=name
- Name for output file (if omitted or "-" output to stdout)
- separator=character
- Field separator
- Special characters: pipe, comma, space, tab, newline
- Default: pipe
v.neighborhoodmatrix identifies all adjacency relations between
polygons in a vector map and exports these as a 2xn matrix where n is the
number of neighborhood relations with each relation only listed in one
direction (i.e. if a is neighbor of b, the list will contain a,b, but
not b,a) unless the
b flag is specified.
By default, neighbors are identified by the category numbers. Using the
idcolumn parameter the user can define a column to use as identifier
of the polygons.
If a path to an output file is specified, the matrix will be written to that
file, otherwise it will be sent to standard output.
Currently the module assumes that the layer above the layer containing the
polygons is empty and available for adding categories to boundaries.
The module uses
v.to.db to determine neighborhood relations.
Send the neighborhood matrix of the census tracts of the North Carolina dataset
to standard output identifying each tract by its category value:
v.neighborhoodmatrix in=census_wake2000
Idem, but identifying each tract by its STFID code and sending the output to a
file:
v.neighborhoodmatrix in=census_wake2000 idcolumn=STFID output=census_neighbors.csv
v.to.db,
Moritz Lennert
SOURCE CODE
Available at:
v.neighborhoodmatrix source code
(history)
Latest change: Mon Jun 28 07:54:09 2021 in commit: 1cfc0af029a35a5d6c7dae5ca7204d0eb85dbc55
Note: This addon document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade your GRASS GIS installation, and read the current addon manual page.
Main index |
Vector index |
Topics index |
Keywords index |
Graphical index |
Full index
© 2003-2023
GRASS Development Team,
GRASS GIS 7.8.8dev Reference Manual