Debian Codegraph @

man/gridindex2nb.Rd

raw
1 \name{gridIndex2nb}
2 \alias{gridIndex2nb}
3 \title{create neighbourhood (nb) object from grid geometry}
4 \description{create neighbourhood (nb) object from grid geometry}
5 \usage{ gridIndex2nb(obj, maxdist = sqrt(2), fullMat = TRUE, ...) }
6 \arguments{
7 \item{obj}{object of class \link{SpatialGrid} or \link{SpatialPixels}}
8 \item{maxdist}{ maximum distance to be considered (inclusive), expressed in number
9 of grid cell (sqrt(2) results in queen neighbours) }
10 \item{fullMat}{ use \link{dist} to compute distances from grid (row/col) indices;
11 FALSE avoids forming the full distance matrix, at a large performance cost }
12 \item{...}{ arguments passed on to \link{dist}}
13 }
14 \value{Object of class nb, which is a list.
15
16 The nb object follows the convention of nb objects in package spdep;
17 it is a list with each list element corresponding to a grid cell or
18 pixel; the list element contains the indices of neighbours defined
19 as cells less than maxdist away, measured in cell unit (N/S/E/W
20 neighbour has distance 1).
21 }
22
23 \note{ Unequal grid cell size is ignored; grid cell row/col indices
24 are taken to be the coordinates from which distances are computed.
25
26 }
27 \seealso{plot.nb in package spdep}
28 \author{ Edzer Pebesma, \email{[email protected]} }
29 %\examples{}
30 \keyword{manip}