SpatialPoints-class {sp}R Documentation

Class "SpatialPoints" ~~~

Description

Class for (irregularly spaced) points

Objects from the Class

Objects can be created by calls of the form SpatialPoints(x).

Slots

coords:
Object of class "matrix", containing the coordinates (each row is a point)
bbox:
Object of class "matrix", with bounding box
proj4string:
Object of class "CRS", projection string

Extends

Class "Spatial", directly.

Methods

[
signature(x = "SpatialPoints"): subsets the points; only rows can be subsetted
coerce
signature(from = "SpatialPoints", to = "data.frame"): retrieves the data part
coerce
signature(from = "data.frame", to = "SpatialPoints"): sets coordinates, which may be in a data frame
coerce
signature(from = "matrix", to = "SpatialPoints"): set coordinates, which may be in a matrix
coordinates
signature(obj = "SpatialPoints"): retrieves the coordinates, as matrix
plot
signature(x = "SpatialPoints"): plot point symbols
points
signature(x = "SpatialPoints"): add point symbols to plot
show
signature(object = "SpatialPoints"): prints coordinates

Note

Author(s)

Edzer J. Pebesma, e.pebesma@geo.uu.nl

References

~put references to the literature/web site here ~

See Also

SpatialPointsDataFrame-class

Examples

x = c(1,2,3,4,5)
y = c(3,2,5,1,4)
S <- SpatialPoints(cbind(x,y))
S <- SpatialPoints(list(x,y))
S <- SpatialPoints(data.frame(x,y))
S
plot(S)

[Package sp version 0.7-12 Index]