areal_edge_detection: Edge detection for areal data

Description Usage Arguments Value Examples

Description

areal_edge_detection ...

Usage

1
2
3
4
areal_edge_detection(shp, vars, scale_smoothing = 0, scale_sobel = 0,
  domain = "neighbors", natural_boundaries = NULL, N = NULL, C = NULL,
  method = "integration", smoothing = "gaussian", combine = NULL,
  res = 50, .progress = "none")

Arguments

shp

SpatialPolygonsDataFrame object (sf objects as converted).

vars

Vector of variable names.

scale_smoothing

Scale parameter for gaussian smoothing to pre-process data. scale_smoothing corresponds to the standard deviation of the normal distribution. Note that the scale depends on the projection of the shapefile. 0 (the default) uses no smoothing.

scale_sobel

Scale parameter for the edge detection algorithm. The parameter corresponds to the standard deviation of the first derivative of the multivariate normal distribution (the edge detection filter). Note that the scale depends on the projection of the shapefile. 0 (the default) automatically adapts to cover the adjacent areas.

domain

Domain for edge detection algorithms: neighbors or unbounded. neighbors just uses neighboring areas. unbounded uses all areas within 3 times the standard deviation. In theory, the normal distribution is non-zero everywhere but in practice it is close to zero more than three standard deviations from the mean.

natural_boundaries

natural_boundaries

N

Adjacency matrix as neighbours list based on poly2nb (optional, saves time for multiple calls).

C

SpatialPoints object with coordinates of cendroids (optional, saves time for multiple calls).

method

Centroid or numerical integration.

smoothing

Smoothing method. 'gaussian' and 'bilateral' are supported. 'bilateral' requires two scale parameter.

combine

Function to combine edges based on different variables. NULL (the default) returns an array with the edges for each variables.

res

Resolution for the numerical integration. The number of integration points is res * res, which is directly related to speed and precision.

.progress

Show process bar.

Value

Numerical vector or array with edge intensity variable.

Examples

1
2
3

jlegewie/BoundaryDetection documentation built on May 17, 2019, 7:28 p.m.