Learn R Programming

spatstat.linnet (version 3.2-2)

lintess: Tessellation on a Linear Network

Description

Create a tessellation on a linear network.

Usage

lintess(L, df, marks=NULL)

Value

An object of class "lintess". There are methods for print, plot and

summary for this object.

Arguments

L

Linear network (object of class "linnet").

df

Data frame of local coordinates for the pieces that make up the tiles of the tessellation. See Details.

marks

Vector or data frame of marks associated with the tiles of the tessellation.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Greg McSwiggan.

Details

A tessellation on a linear network L is a partition of the network into non-overlapping pieces (tiles). Each tile consists of one or more line segments which are subsets of the line segments making up the network. A tile can consist of several disjoint pieces.

The data frame df should have columns named seg, t0, t1 and tile. Any additional columns will be ignored.

Each row of the data frame specifies one sub-segment of the network and allocates it to a particular tile.

The seg column specifies which line segment of the network contains the sub-segment. Values of seg are integer indices for the segments in as.psp(L).

The t0 and t1 columns specify the start and end points of the sub-segment. They should be numeric values between 0 and 1 inclusive, where the values 0 and 1 representing the network vertices that are joined by this network segment.

The tile column specifies which tile of the tessellation includes this sub-segment. It will be coerced to a factor and its levels will be the names of the tiles.

If df is missing or NULL, the result is a tessellation with only one tile, consisting of the entire network L.

Additional data called marks may be associated with each tile of the tessellation. The argument marks should be a vector with one entry for each tile (that is, one entry for each level of df$tile) or a data frame with one row for each tile. In general df and marks will have different numbers of rows.

See Also

linnet for linear networks.

plot.lintess for plotting.

divide.linnet to make a tessellation demarcated by given points.

chop.linnet to make a tessellation demarcated by infinite lines.

lineardirichlet to create the Dirichlet-Voronoi tessellation from a point pattern on a linear network.

as.linfun.lintess, as.linnet.lintess and as.linim to convert to other classes.

tile.lengths to compute the length of each tile in the tessellation.

The undocumented methods Window.lintess and as.owin.lintess extract the spatial window.

Examples

Run this code
   # tessellation consisting of one tile for each existing segment
   ns <- nsegments(simplenet)
   df <- data.frame(seg=1:ns, t0=0, t1=1, tile=letters[1:ns])
   u <- lintess(simplenet, df)
   u
   plot(u)
   S <- as.psp(simplenet)
   marks(u) <- data.frame(len=lengths_psp(S), ang=angles.psp(S))
   u
   plot(u)

Run the code above in your browser using DataLab