Compute the distance function of a point pattern on a linear network.
A point pattern on a linear network
(object of class
An integer. The distance to the
Extra arguments are ignored.
On a linear network L, the “geodesic distance function”
of a set of points A in L is the
mathematical function f such that, for any
location s on L,
the function value
is the shortest-path distance from s to A.
distfun.lpp is a method for the generic command
for the class
"lpp" of point patterns on a linear network.
X is a point pattern on a linear network,
f <- distfun(X) returns a function
in the R language that represents the
distance function of
X. Evaluating the function
in the form
v <- f(x,y), where
are any numeric vectors of equal length containing coordinates of
spatial locations, yields the values of the distance function at these
locations. More efficiently
f can be called in the form
v <- f(x, y, seg, tp) where
tp are the local
coordinates on the network. It can also be called as
v <- f(x) where
x is a point pattern on the same linear
f obtained from
f <- distfun(X)
also belongs to the class
It can be printed and plotted immediately as shown in the Examples.
It can be
converted to a pixel image using
function with arguments
x,y and optional
It also belongs to the class
"linfun" which has methods
To identify which point is the nearest neighbour, see
1 2 3 4 5 6 7 8 9 10 11
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.