marshal.SpatVector | R Documentation |
Marshalling of 'terra' objects
## S3 method for class 'SpatVector'
marshal(terra, ...)
## S3 method for class 'SpatVector'
marshallable(...)
terra |
An terra::SpatVector. |
... |
Not used. |
terra::wrap()
is used to produce a marshalled version
of the original object.
terra::vect()
is used to reconstruct a version of the
original object from the marshalled object.
A marshalled
object as described in marshal()
.
if (requireNamespace("terra", quietly = TRUE)) {
file <- system.file("ex/lux.shp", package = "terra")
v <- terra::vect(file)
## Marshal SpatVector object
v_ <- marshal(v)
## Unmarshal SpatVector object
v2 <- unmarshal(v_)
stopifnot(all.equal(v2, v, check.attributes = FALSE))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.