Spatial-class {sp} | R Documentation |
An abstract class from which useful spatial classes are derived
Spatial(bbox, proj4string = CRS(as.character(NA))) ## S3 method for class 'Spatial' subset(x, subset, select, drop = FALSE, ...)
bbox |
a bounding box matrix |
proj4string |
a CRS object |
x |
object of class Spatial |
subset |
|
select |
|
drop |
|
... |
ignored |
are never to be generated; only derived classes can be meaningful
bbox
:Object of class "matrix"
; 2-column matrix
holding the minimum in first and maximum in second column for the
x-coordinate (first row), y-coordinate (second row) and optionally,
for points and grids only, further coordinates. The constructed
Spatial object will be invalid if any bbox values are NA or infinite. The column names must be c("min", "max")
proj4string
:Object of class "CRS"
;
holding a valid proj4 string, which can be used for unprojecting
or reprojecting coordinates; it is initialised to NA. Other strings
are checked for validity in the rgdal package, but attempts to assign a string containing "longlat" to data extending beyond longitude [-180, 360] or lattitude [-90, 90] will be stopped or warned, use set_ll_warn
to warn rather than stop, and set_ll_TOL
to change the default tolerance for the range exceedance tests.
signature(obj = "Spatial")
: retrieves the bbox element
signature(obj = "Spatial")
: retrieves the number
of spatial dimensions spanned
signature(obj = "Spatial")
: logical, tells whether
the data is on a regular spatial grid
signature(x = "Spatial", y = "missing")
: plot method
for spatial objects; does nothing but setting up a plotting region choosing
a suitable aspect if not given(see below), colouring the plot background using either a bg= argument or par("bg"), and possibly drawing axes.
signature(object = "Spatial")
: summarize object
this class is not useful in itself, but all spatial classes in this package derive from it
The default aspect for map plots is 1; if however data are not projected (coordinates are longlat), the aspect is by default set to 1/cos(My * pi)/180) with My the y coordinate of the middle of the map (the mean of ylim, which defaults to the y range of bounding box).
The argument setParUsrBB
may be used to pass the logical value TRUE
to functions within plot.Spatial
. When set to TRUE
, par(“usr”) will be overwritten with c(xlim, ylim)
, which defaults to the bounding box of the spatial object. This is only needed in the particular context of graphic output to a specified device with given width and height, to be matched to the spatial object, when using par(“xaxs”) and par(“yaxs”) in addition to par(mar=c(0,0,0,0))
.
r-spatial team; Edzer Pebesma, edzer.pebesma@uni-muenster.de Roger Bivand, Barry Rowlingson, Virgilio G\'omez-Rubio
SpatialPoints-class
,
SpatialGrid-class
,
SpatialPointsDataFrame-class
,
SpatialGridDataFrame-class