File: over.Rd

package info (click to toggle)
r-cran-spacetime 1.2-8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,300 kB
  • sloc: sh: 13; makefile: 2
file content (96 lines) | stat: -rw-r--r-- 3,855 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
\name{over-methods}
\docType{methods}
\alias{over}
\alias{aggregate}
\alias{over,xts,xts-method}
\alias{over,ST,STS-method}
\alias{over,STF,STF-method}
\alias{over,STS,STF-method}
\alias{over,STI,STF-method}
\alias{over,STF,STS-method}
\alias{over,STS,STS-method}
\alias{over,STI,STS-method}
\alias{over,STF,STI-method}
\alias{over,STS,STI-method}
\alias{over,STI,STI-method}
\alias{over,STF,STFDF-method}
\alias{over,STS,STFDF-method}
\alias{over,STI,STFDF-method}
\alias{over,STF,STSDF-method}
\alias{over,STS,STSDF-method}
\alias{over,STI,STSDF-method}
\alias{over,STF,STIDF-method}
\alias{over,STS,STIDF-method}
\alias{over,STI,STIDF-method}
\alias{aggregate,ST-method}
\title{ 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{
\S4method{over}{STF,STF}(x, y, returnList = FALSE, fn = NULL, ...)
\S4method{over}{xts,xts}(x, y, returnList = FALSE, fn = NULL, ...)
\S4method{aggregate}{ST}(x, by, FUN, \dots, simplify = TRUE)
}
\arguments{
\item{x}{geometry (S/T locations) of the queries}
\item{y}{layer from which the geometries or attributes are queried}
\item{returnList}{ logical; determines whether a list is returned, 
or an index vector }
\item{fn}{(optional) a function; see value }
\item{by}{ geometry over which attributes in \code{x} are aggregated
(this can be a \code{Spatial*} geometry, or a \code{ST*} geometry), or
temporal aggregation, such as "month", "10 minutes", or a function such
as \link[zoo]{as.yearmon}; see \link[zoo]{aggregate.zoo}. In case \code{x}
is of class \link{STFDF}, argument \code{by} may be "time" or "space", in
which cases aggregation over all time or all space is carried out.}
\item{FUN}{aggregation function}
\item{simplify}{boolean; if TRUE, and space or time dimensions can be
dropped, the simpler (\code{Spatial} or \code{xts}) object will be returned }
\item{...}{arguments passed on to function fn or FUN}
}
\value{ 
an object of length \code{length(x)}, or a data.frame with number
of rows equal to \code{length(x)}. If \code{returnList} is FALSE,
a vector with indices of \code{y} for each geometry (point, grid
cell centre, polygon or lines x time point) in \code{x}.  if \code{returnList} is
TRUE, a list of length \code{length(x)}, with list element \code{i}
the vector of indices of the geometries in \code{y} that correspond
to the $i$-th geometry in \code{x}.

The \code{aggregate} method for \code{ST} objects aggregates the attribute values of \code{x}
over the geometry (space, time, or space-time) of \code{by}, using
aggregation function \code{FUN}.

For the matching of time intervals, see \link{timeMatch}.

For setting, or retrieving whether time represents intervals, see
\link{timeIsInterval}.
} 
\section{Methods}{
\describe{
\item{x = "STF", y = "STF"}{ }
\item{x = "xts", y = "xts"}{ finds the row index of the instance
or interval of time instances of \code{x} matching to \code{y}. Only if
\code{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 \code{y}, its interval is right-open.  }

}
}

\note{
See also \link[sp]{over}; methods intersecting SpatialLines with
anything else, or SpatialPolygons with SpatialPolygons, need rgeos
to be loaded first.
}
\author{Edzer Pebesma, \email{edzer.pebesma@uni-muenster.de}}
\references{ https://www.jstatsoft.org/article/view/v051i07 }

\seealso{\link[sp]{over}; \code{vignette('sto')}, \code{vignette('over')}, 
\link{timeMatch}, \link{timeIsInterval}}

\keyword{methods}