Convert to other R spatial objects

as_sf(x)

as_vect(x)

as_character(x)

Arguments

x

Quadtree object

Value

an object of class sf or SpatVector, or a Well-Known Text (WKT) character representation

Examples

library(quadtree)
habitat <- terra::rast(system.file("extdata", "habitat.tif", package="quadtree"))

qt <- quadtree(habitat, .1)
sf <- as(qt, "sf")
sr <- as(qt, "SpatRaster")
sv <- as(qt, "SpatVector")
ch <- as(qt, "character")