Marshalling of 'terra' objects

# S3 method for SpatVector
marshal(terra, ...)

# S3 method for SpatVector
marshallable(...)

Arguments

terra

An terra::SpatVector.

...

Not used.

Value

A marshalled object as described in marshal().

Details

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.

Examples

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))
}