| SpatialPoints {sp} | R Documentation |
create objects of class SpatialPoints-class or
SpatialPointsDataFrame-class from
coordinates, and from coordinates and data.frames
SpatialPoints(coords, proj4string=CRS(as.character(NA)), bbox = NULL)
SpatialPointsDataFrame(coords, data, coords.nrs = numeric(0),
proj4string = CRS(as.character(NA)), match.ID = TRUE, bbox = NULL)
coords |
numeric matrix or data.frame with coordinates (each row is a point); in case of SpatialPointsDataFrame an object of class SpatialPoints-class is also allowed |
proj4string |
projection string of class CRS-class |
bbox |
bounding box matrix, usually NULL and constructed from the data, but may be passed through for coercion purposes if clearly needed |
data |
object of class |
coords.nrs |
numeric; if present, records the column positions where
in |
match.ID |
logical; if TRUE AND coords has rownames (i.e., coerced
to a matrix, |
SpatialPoints returns an object of class SpatialPoints;
SpatialPointsDataFrame returns an object of class SpatialPointsDataFrame;
coordinates, SpatialPoints-class, SpatialPointsDataFrame-class