spatial: Spatial Methods for 'Vegsoup*' Objects

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Spatial methods as defined in package sp.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## S4 method for signature 'Vegsoup'
coordinates(obj)

## S4 method for signature 'Sites'
coordinates(obj)

## S4 replacement method for signature 'Vegsoup'
coordinates(obj) <- value

## S4 method for signature 'Vegsoup'
bbox(obj)

## S4 method for signature 'Vegsoup'
bbox(x)

## S4 method for signature 'Vegsoup'
proj4string(obj)

## S4 replacement method for signature 'Vegsoup'
proj4string(obj) <- value

## S4 method for signature 'Vegsoup'
spTransform(obj, CRS)

## S4 method for signature 'Vegsoup'
SpatialPointsVegsoup(obj)

## S4 method for signature 'Vegsoup'
SpatialPolygonsVegsoup(obj)

## S4 method for signature 'Vegsoup'
over(x, y, returnList = FALSE, fn = NULL, ...)

Arguments

x, obj

Vegsoup object.

y

SpatialPolygonsDataFrame object.

value

For coordinates spatial coordinates; either a "matrix", "list", or "data.frame" with numeric data. See coordinates.

For proj4string a CRS object, containing a valid Proj.4 string.

CRS

An object of class "CRS". See CRS.

...

Additional arguments, not used.

returnList, fn

See over in sp.

Details

All methods operate on the spatial slots of an object: SpatialPointsVegsoup and SpatialPolygonsVegsoup.

Value

An object depending on the input class.

Author(s)

Roland Kaiser

See Also

Spatial,extract

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require(vegsoup)

data(barmstein)
x <- barmstein

# coordinate reference system of data set is WGS 84
proj4string(x)

# transform to WGS 84 / Pseudo Mercator
require(rgdal)
xt <- spTransform(x, CRS("+init=epsg:3857"))

# plain matrix of coordiantes
coordinates(x)

# bounding box, as defined in package 'sp'
bbox(x)

# extent, the same as above but returned as class 'Extent'
# as defined in package 'raster'
extent(x)

# assign new coordinates
# first create the data as columns
x$X <- rnorm(nrow(x))
x$Y <- rnorm(nrow(x))
sites(x)

# use the formula interface
coordinates(x) <- ~X+Y
coordinates(x)

# get slot 'sp.points' as sp class
class(SpatialPointsVegsoup(x))

# get slot 'sp.polygons' as sp class
class(SpatialPolygonsVegsoup(x))

vegsoup documentation built on Feb. 24, 2021, 3 a.m.