README.md

APUpscale

R-CMD-check

Overview

The package provides a workable way to upscale huge categorical map using area preserving method. It can ensure both the compositional information and landscape characteristics. It does the calculation in two ways:

NOTE: For a moderate size map, it might be less efficient. And if the base map is large and the upscale factor is small (e.g. upscaling 4m to 30m), it might be very slow but still workable.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("LLeiSong/APUpscale")

Usage

library(APUpscale)
library(terra)
nlcd <- rast(system.file('extdata/nlcd_dukes.tif', package = "APUpscale"))
lc_coarse <- upscale(nlcd, cellsize = 1000, nthread = 2)
coltab(lc_coarse) <- coltab(nlcd)
plot(lc_coarse)

References

  1. Johnson, J. Michael, and Keith C. Clarke. "An area preserving method for improved categorical raster resampling." Cartography and Geographic Information Science 48.4 (2021): 292-304.

  2. mikejohnson51/resample



LLeiSong/APUpscale documentation built on June 2, 2022, 12:28 p.m.