# lineartileindex: Determine Which Tile Contains Each Given Point on a Linear... In spatstat.linnet: Linear Networks Functionality of the 'spatstat' Family

## Description

Given a tessellation on a linear network, and a list of points on the network, determine which tile of the tessellation contains each of the given points.

## Usage

 `1` ```lineartileindex(seg, tp, Z, method = c("encode", "C", "interpreted")) ```

## Arguments

 `seg,tp` Vectors of local coordinates of the query points. See Details. `Z` A tessellation on a linear network (object of class `"lintess"`). `method` Internal use only.

## Details

This low-level function is the analogue of `tileindex` for linear networks. For a tessellation `Z` on a linear network, and a list of query points on the same network, the function determines which tile of the tessellation contains each query point.

Argument `Z` should be a tessellation on a linear network (object of class `"lintess"`).

The vectors `seg` and `tp` specify the locations of the query points, on the same network, using local coordinates: `seg` contains integer values specifying which segment of the network contains each query point; `tp` contains numeric values between 0 and 1 specifying the fractional position along that segment.

The result is a factor, of the same length as `seg` and `tp`, indicating which tile contains each point. The levels of the factor are the names of the tiles of `Z`.

## Value

A factor, of the same length as `seg` and `tp`, whose levels are the names of the tiles of `Z`.

## Author(s)

\spatstatAuthors

`lintess`.

`as.linfun.lintess` to create a function whose value is the tile index.

`cut.lpp` for a neater way to classify the points of a point pattern on a linear network according to a tessellation on the network.

## Examples

 ```1 2 3 4``` ``` Z <- lineardirichlet(runiflpp(15, simplenet)) X <- runiflpp(10, simplenet) coX <- coords(X) ii <- lineartileindex(coX\$seg, coX\$tp, Z) ```

spatstat.linnet documentation built on July 17, 2021, 9:07 a.m.