svToSpatial | R Documentation |
This function converts a SpatVector
object from the terra package to a Spatial
object of the appropriate class (SpatialPoints
, SpatialPointsDataFrame
, SpatialPolygons
, or SpatialPolygonsDataFrame
).
svToSpatial(x)
x |
|
Object of class Spatial
.
f <- system.file('ex/lux.shp', package='terra') v <- terra::vect(f) spat <- svToSpatial(v) spat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.