neighborDirection: Calculation of the direction of every object to its neighbors

View source: R/neighborDirection.R

neighborDirectionR Documentation

Calculation of the direction of every object to its neighbors

Description

This function neighborDirection calculate the direction in degree to its surrounding neighbors or a selection

Usage

neighborDirection(spdf, col.name, modus = "nb", tol = 360,
  spdf.bb = NULL, sp.PoS = NULL, nb = NULL, bb = NULL, cores = 1,
  quiet = TRUE, ...)

Arguments

spdf

SpatialPolygonsDataFrame, or full path of a shapefile

col.name

column name for angles (in degree, N = 0, E = 90, S = 180, W = 270)

modus

"bb" for using a boundig box or "nb" for using object neighborhood nb. Modus bb returns data.frame based on spdf. Modus nb returns list based on nb.

tol

tolerance for select neighbor of specific range. Default: 360

spdf.bb

SpatialPolygonsDataFrame from which the bounding boxes are created

sp.PoS

SpatialPoints to which the direction is calculated. As standard they are calculated from spdf input. Default: NULL

nb

object neighborhood based on poly2nb, for modus "nb. Default: Null

bb

bounding box for modus "bb". Default: Null

cores

number of cores for parallel processing. Default: 1 (sequential)

quiet

no outputs in console. Default: TRUE

Value

In the case of modus nb a list is returned. If modus bb is set, a data.frame based on the input spdf is returned

Note

  • SpatialPolygonsDataFrame input must have an ID field with unique numbers


ggRaver/Lslide documentation built on April 8, 2022, 7:14 a.m.