Description
Region Quadtrees for Spatial Data.
Description
Provides functionality for working with raster-like quadtrees (also called “region quadtrees”), which allow for variable-sized cells. The package allows for flexibility in the quadtree creation process. Several functions defining how to split and aggregate cells are provided, and custom functions can be written for both of these processes. In addition, quadtrees can be created using other quadtrees as “templates”, so that the new quadtree's structure is identical to the template quadtree. The package also includes functionality for modifying quadtrees, querying values, saving quadtrees to a file, and calculating least-cost paths using the quadtree as a resistance surface.
README.md
quadtree
: An R package for region quadtrees
quadtree
provides functionality for working with raster-like quadtrees (called “region quadtrees”), which allow for variable-sized cells.
library(quadtree)
habitat <- terra::rast(system.file("extdata", "habitat.tif", package="quadtree")) # load sample data
qt <- quadtree(habitat, .03, "sd") # create a quadtree
Installation
The package can be installed from CRAN using install.packages()
:
install.packages("quadtree")
The development version can be installed from GitHub using devtools::install_github()
:
# install.packages("devtools")
devtools::install_github("dfriend21/quadtree")
Documentation
Visit the package website for more information.
Learning how to use the quadtree
package
The best way to learn about the package is by reading the vignettes, which are available through R and through the package website. I’d suggest reading the vignettes in this order: