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

lixellate

Subdivide Segments of a Network


Description

Each line segment of a linear network will be divided into several shorter segments (line elements or lixels).

Usage

lixellate(X, ..., nsplit, eps, sparse = TRUE)

Arguments

X

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

...

Ignored.

nsplit

Number of pieces into which each line segment of X should be divided. Either a single integer, or an integer vector with one entry for each line segment in X. Incompatible with eps.

eps

Maximum length of the resulting pieces of line segment. A single numeric value. Incompatible with nsplit.

sparse

Optional. Logical value specifying whether the resulting linear network should be represented using a sparse matrix. If sparse=NULL, then the representation will be the same as in X.

Details

Each line segment in X will be subdivided into equal pieces. The result is an object of the same kind as X, representing the same data as X except that the segments have been subdivided.

Splitting is controlled by the arguments nsplit and eps, exactly one of which should be given.

If nsplit is given, it specifies the number of pieces into which each line segment of X should be divided. It should be either a single integer, or an integer vector of length equal to the number of line segments in X.

If eps is given, it specifies the maximum length of any resulting piece of line segment.

It is strongly advisable to use sparse=TRUE (the default) to limit the computation time.

If X is a point pattern (class "lpp") then the spatial coordinates and marks of each data point are unchanged, but the local coordinates will change, because they are adjusted to map them to the new subdivided network.

Value

Object of the same kind as X.

Author(s)

Greg McSwiggan, Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also

Examples

A <- lixellate(simplenet, nsplit=4)
   plot(A, main="lixellate(simplenet, nsplit=4)")
   points(vertices(A), pch=16)

   spiders
   lixellate(spiders, nsplit=3)

spatstat.linnet

Linear Networks Functionality of the 'spatstat' Family

v2.1-1
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Ottmar Cronie [ctb], Tilman Davies [ctb], Greg McSwiggan [ctb], Suman Rakshit [ctb]
Initial release
2021-03-28

We don't support your browser anymore

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