# consistent spatio-temporal overlay for objects inheriting from ST

### Description

consistent spatio-temporal overlay for STF, STS and STI objects, as well as their *DF counterpart: retrieves the indexes or attributes from one geometry at the spatio-temporal points of another

### Usage

1 2 3 4 5 6 |

### Arguments

`x` |
geometry (S/T locations) of the queries |

`y` |
layer from which the geometries or attributes are queried |

`returnList` |
logical; determines whether a list is returned, or an index vector |

`fn` |
(optional) a function; see value |

`by` |
geometry over which attributes in |

`FUN` |
aggregation function |

`simplify` |
boolean; if TRUE, and space or time dimensions can be
dropped, the simpler ( |

`...` |
arguments passed on to function fn or FUN |

### Value

an object of length `length(x)`

, or a data.frame with number
of rows equal to `length(x)`

. If `returnList`

is FALSE,
a vector with indices of `y`

for each geometry (point, grid
cell centre, polygon or lines x time point) in `x`

. if `returnList`

is
TRUE, a list of length `length(x)`

, with list element `i`

the vector of indices of the geometries in `y`

that correspond
to the $i$-th geometry in `x`

.

The `aggregate`

method for `ST`

objects aggregates the attribute values of `x`

over the geometry (space, time, or space-time) of `by`

, using
aggregation function `FUN`

.

For the matching of time intervals, see timeMatch.

For setting, or retrieving whether time represents intervals, see timeIsInterval.

### Methods

- x = "STF", y = "STF"
- x = "xts", y = "xts"
finds the row index of the instance or interval of time instances of

`x`

matching to`y`

. Only if`timeIsInterval(x) == TRUE`

, intervals are sought. In that case, time intervals start at the time instance of a record, and end at the next. The last time interval length is set to the interval length of the one-but-last (non-zero) interval. In case of a single time instance for`y`

, its interval is right-open.

### Note

See also over; methods intersecting SpatialLines with anything else, or SpatialPolygons with SpatialPolygons, need rgeos to be loaded first.

### Author(s)

Edzer Pebesma, edzer.pebesma@uni-muenster.de

### References

http://www.jstatsoft.org/v51/i07/

### See Also

over; `vignette('sto')`

, `vignette('over')`

,
timeMatch, timeIsInterval

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.