ST-class: Class "ST"

ST-classR Documentation

Class "ST"

Description

An abstract class from which useful spatio-temporal classes are derived

Usage

ST(sp, time, endTime)

Arguments

sp

an object deriving from class Spatial, such as a SpatialPoints or SpatialPolygons

time

an object of class xts, or a time vector (currently: Date, POSIXct, timeDate, yearmon and yearqtr; are supported; see xts); in the latter case, it should be in time order

endTime

vector of class POSIXct holding end points of time intervals

Objects from the Class

Objects of this class are not meant to be useful; only derived classes can be meaningful

Slots

sp:

Object deriving from class "Spatial"

time:

Object of class "xts"

Methods

[[

signature(obj = "ST"): retrieves the attribute element

$

signature(obj = "ST"): retrieves the attribute element

[[<-

signature(obj = "ST"): sets or replaces the attribute element

$<-

signature(obj = "ST"): sets or replaces the attribute element

Note

argument (and object slot) sp can be pure geometry, or geometry with attributes. In the latter case, the geometries are kept with the sp slot, and only replicated (when needed) on coercion to the long format, with as.data.frame.

Slot time needs to be of class xts; if a time or date vector is passed as argument to SP, it will be converted into an xts object.

When endTime is missing, an error is thrown.

ST is meant as a super-class, and is not to be used for representing data, similar to Spatial in the sp package.

Author(s)

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

References

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

Examples

time = as.Date('2008-01-01')+1:2
library(sp)
sp = SpatialPoints(cbind(c(0,1),c(0,1)))
ST(sp, time, delta(time))

edzer/spacetime documentation built on Jan. 4, 2024, 7:46 p.m.