| wrap {terra} | R Documentation |
Use wrap to pack a SpatRaster or SpatVector object to create a Packed* object. Packed objects can be passed over a connection that serializes (e.g. to nodes on a computer cluster). At the receiving end they need to be unpacked with unwrap.
## S4 method for signature 'SpatRaster' wrap(x, proxy=FALSE) ## S4 method for signature 'SpatVector' wrap(x) ## S4 method for signature 'ANY' unwrap(x)
x |
SpatVector or SpatRaster |
proxy |
logical. If |
wrap: Packed* object
unwrap: SpatRaster or SpatVector
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
p <- wrap(v)
p
vv <- vect(p)
vv