SpatialPoints

0th

Percentile

create objects of class SpatialPoints or SpatialPointsDataFrame

create objects of class SpatialPoints-class or SpatialPointsDataFrame-class from coordinates, and from coordinates and data.frames

Keywords
manip
Usage
SpatialPoints(coords, proj4string=CRS(as.character(NA)))
SpatialPointsDataFrame(coords, data, coords.nrs = numeric(0), 
		proj4string = CRS(as.character(NA)), match.ID = TRUE)
Arguments
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
data
object of class data.frame or of class AttributeList-class; the number of rows in data should equal the number of points in the coords object
coords.nrs
numeric; if present, records the column positions where in data the coordinates were taken from (used by coordinates<-)
match.ID
logical; if TRUE AND coords has rownames (i.e., coerced to a matrix, dimnames(coords)[[2]] is not NULL), AND data has row.names (i.e. is a data.frame), then the SpatialPointsDataFrame object is formed by matching the row names of
Value

  • SpatialPoints returns an object of class SpatialPoints; SpatialPointsDataFrame returns an object of class SpatialPointsDataFrame;

See Also

coordinates, SpatialPoints-class, SpatialPointsDataFrame-class

Aliases
  • SpatialPoints
  • SpatialPointsDataFrame
Documentation reproduced from package sp, version 0.7-10, License: GPL version 2 or later

Community examples

Looks like there are no examples yet.