Learn R Programming

quadtree (version 0.1.14)

as_sf: Convert to other R spatial objects

Description

Convert to other R spatial objects

Usage

as_sf(x)

as_vect(x)

as_character(x)

Value

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

Arguments

x

Quadtree object

Examples

Run this code
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")

Run the code above in your browser using DataLab