1v.neighbors(1)              GRASS GIS User's Manual             v.neighbors(1)
2
3
4

NAME

6       v.neighbors  - Neighborhood analysis tool for vector point maps.
7       Makes  each  cell  value a function of the attribute values assigned to
8       the vector points or centroids in a radius around it,  and  stores  new
9       cell values in an output raster map.
10

KEYWORDS

12       vector, algebra, statistics, raster, aggregation
13

SYNOPSIS

15       v.neighbors
16       v.neighbors --help
17       v.neighbors   input=name    [layer=string]   output=name  method=string
18       size=float   [points_column=name]    [cats=range]     [where=sql_query]
19       [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]
20
21   Flags:
22       --overwrite
23           Allow output files to overwrite existing files
24
25       --help
26           Print usage summary
27
28       --verbose
29           Verbose module output
30
31       --quiet
32           Quiet module output
33
34       --ui
35           Force launching GUI dialog
36
37   Parameters:
38       input=name [required]
39           Name of input vector map
40           Or data source for direct OGR access
41
42       layer=string
43           Layer number or name
44           Vector  features can have category values in different layers. This
45           number determines which layer to use. When used with direct OGR ac‐
46           cess this is the layer name.
47           Default: 1
48
49       output=name [required]
50           Name for output raster map
51
52       method=string [required]
53           Method for aggregate statistics (count if non given)
54           Options:  count,  sum,  average,  median,  mode,  minimum, maximum,
55           range, stddev, variance, diversity
56           Default: count
57
58       size=float [required]
59           Neighborhood diameter in map units
60
61       points_column=name
62           Column name of points map to use for statistics
63           Column of points map must be numeric
64
65       cats=range
66           Category values
67           Example: 1,3,7-9,13
68
69       where=sql_query
70           WHERE conditions of SQL statement without ’where’ keyword
71           Example: income < 1000 and population >= 10000
72

DESCRIPTION

74       This module makes each cell value a function of  the  attribute  values
75       assigned  to  the vector points or centroids in an area around the cell
76       with a diameter of size around it, and stores the new  cell  values  in
77       the  output  raster  map  layer. By default, the module just counts the
78       number of points. The user can also choose amongst a variety of  aggre‐
79       gate statistics using the parameter method. These statistics are calcu‐
80       lated on the attributes in the point_column. Using the usual  cats  and
81       where parameters the user can chose to take only a subset of the points
82       into account.
83
84       Note that size is defined as the diameter, and so has to be  twice  the
85       wanted search radius, and that the module works within the current com‐
86       putational region which can be adjusted using g.region. If  the  vector
87       map  falls  completely outside the current region, the module will stop
88       with an error.
89

EXAMPLE

91       Count the number of schools for a given  grid  (North  Carolina  sample
92       dataset):
93       g.region vector=schools_wake res=100 -p -a
94       v.neighbors input=schools_wake output=schools_wake_3000m method=count size=3000
95       d.mon wx0
96       d.rast schools_wake_3000m
97       d.vect schools_wake
98       The  result  gives  for  each  grid  cell  the  number of points (here:
99       schools) not farther than 1500 meter  away  (half  of  the  given  size
100       value) from the respective cell center.
101
102       Calculate the mean capacity of schools for the same grid:
103       v.neighbors input=schools_wake output=schools_capacity point_column=CAPACITYTO \
104                   method=average size=3000
105

SEE ALSO

107        r.neighbors, v.vect.stats
108

AUTHORS

110       Radim Blazek,
111       Moritz Lennert
112

SOURCE CODE

114       Available at: v.neighbors source code (history)
115
116       Accessed: Mon Jun 20 16:47:05 2022
117
118       Main  index  | Vector index | Topics index | Keywords index | Graphical
119       index | Full index
120
121       © 2003-2022 GRASS Development Team, GRASS GIS 8.2.0 Reference Manual
122
123
124
125GRASS 8.2.0                                                     v.neighbors(1)
Impressum