distmap.lpp: Distance Map of Point Pattern on Linear Network

View source: R/distfunlpp.R

distmap.lppR Documentation

Distance Map of Point Pattern on Linear Network

Description

Computes the distance from each pixel to the nearest point in the given point pattern on a linear network.

Usage

  ## S3 method for class 'lpp'
distmap(X, ..., k=1)

Arguments

X

A point pattern on a linear network (object of class "lpp").

k

Integer. The distance to the k-th nearest data point will be computed.

...

Arguments passed to as.linim.linfun to control pixel resolution.

Details

This is a method for the generic function distmap. It computes the distance map of the point pattern X as a pixel image on the network.

At a pixel u, the greyscale value equals the distance from u to the nearest point of the pattern X (or the k-th nearest point of X).

Value

A pixel image on the network (object of class "linim") whose greyscale values are the values of the distance map.

Distance values

The pixel values in the image distmap(X) are distances, expressed as multiples of the unit of length of the spatial coordinates in X. The unit of length is given by unitname(X).

Note that, if the unit of length in X is a composite expression such as ‘2 microns’, then the values in distmap(X) are expressed as multiples of 2 microns, rather than being expressed in microns.

Author(s)

\spatstatAuthors

.

See Also

Generic function distmap and methods.

Examples

  plot(distmap(spiders))

spatstat/spatstat.linnet documentation built on Jan. 25, 2025, 11:48 a.m.