svToSpatial: Convert SpatVector to Spatial*

View source: R/svToSpatial.r

svToSpatialR Documentation

Convert SpatVector to Spatial*

Description

This function converts a SpatVector object from the terra package to a Spatial object of the appropriate class (SpatialPoints, SpatialPointsDataFrame, SpatialPolygons, or SpatialPolygonsDataFrame).

Usage

svToSpatial(x)

Arguments

x

SpatVector object.

Value

Object of class Spatial.

Examples


f <- system.file('ex/lux.shp', package='terra')
v <- terra::vect(f)
spat <- svToSpatial(v)
spat


adamlilith/enmSdm documentation built on Jan. 6, 2023, 11 a.m.