Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

distmap

Distance Map


Description

Compute the distance map of an object, and return it as a pixel image. Generic.

Usage

distmap(X, ...)

Arguments

X

Any suitable dataset representing a two-dimensional object, such as a point pattern (object of class "ppp"), a window (object of class "owin") or a line segment pattern (object of class "psp").

...

Arguments passed to as.mask to control pixel resolution.

Details

The “distance map” of a set of points A is the function f whose value f(x) is defined for any two-dimensional location x as the shortest distance from x to A.

This function computes the distance map of the set X and returns the distance map as a pixel image.

This is generic. Methods are provided for point patterns (distmap.ppp), line segment patterns (distmap.psp) and windows (distmap.owin).

Value

A pixel image (object of class "im") whose grey scale values are the values of the distance map.

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

See Also

Examples

data(cells)
  U <- distmap(cells)
  V <- distmap(letterR)
  if(interactive()) {
  plot(U)
  plot(V)
  }

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.