MyNixOS website logo
Description

Structurally Guided Sampling.

Structurally guided sampling (SGS) approaches for airborne laser scanning (ALS; LIDAR). Primary functions provide means to generate data-driven stratifications & methods for allocating samples. Intermediate functions for calculating and extracting important information about input covariates and samples are also included. Processing outcomes are intended to help forest and environmental management practitioners better optimize field sample placement as well as assess and augment existing sample networks in the context of data distributions and conditions. ALS data is the primary intended use case, however any rasterized remote sensing data can be used, enabling data-driven stratifications and sampling approaches.

sgsR - structurally guided sampling

license R-CMD-check Codecov testcoverage

Installation :computer:

Install the stable version of sgsRfrom CRAN with:

install.packages("sgsR")
library(sgsR)

Install the most recent development version of sgsR from Github with:

install.packages("devtools")
devtools::install_github("https://github.com/tgoodbody/sgsR")
library(sgsR)

Citing sgsR in literature

Open access publication: sgsR: a structurally guided sampling toolbox for LiDAR-based forest inventories

To cite sgsR use citation() from within R with:

print(citation("sgsR"), bibtex = TRUE)
#> 
#> To cite package 'sgsR' in publications use:
#> 
#>   Goodbody, TRH., Coops, NC., Queinnec, M., White, JC., Tompalski, P.,
#>   Hudak, AT., Auty, D., Valbuena, R., LeBoeuf, A., Sinclair, I.,
#>   McCartney, G., Prieur, J-F., Woods, ME. (2023). sgsR: a structurally
#>   guided sampling toolbox for LiDAR-based forest inventories. Forestry:
#>   An International Journal of Forest Research.
#>   10.1093/forestry/cpac055.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {sgsR: a structurally guided sampling toolbox for LiDAR-based forest inventories.},
#>     author = {Tristan R.H. Goodbody and Nicholas C. Coops and Martin Queinnec and Joanne C. White and Piotr Tompalski and Andrew T. Hudak and David Auty and Ruben Valbuena and Antoine LeBoeuf and Ian Sinclair and Grant McCartney and Jean-Francois Prieur and Murray E. Woods},
#>     journal = {Forestry: An International Journal of Forest Research},
#>     year = {2023},
#>     doi = {10.1093/forestry/cpac055},
#>   }
#> 
#>   Tristan RH Goodbody, Nicholas C Coops and Martin Queinnec (2023).
#>   Structurally Guided Sampling. R package version 1.4.4.
#>   https://cran.r-project.org/package=sgsR.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {Structurally Guided Sampling},
#>     author = {Tristan RH Goodbody and Nicholas C Coops and Martin Queinnec},
#>     year = {2023},
#>     note = {R package version 1.4.4},
#>     url = {https://cran.r-project.org/package=sgsR},
#>   }

Overview

sgsR provides a collection of stratification and sampling algorithms that use auxiliary information for allocating sample units over an areal sampling frame. ALS metrics, like those derived from the lidR package are the intended inputs.

Other remotely sensed or auxiliary data can also be used (e.g. optical satellite imagery, climate data, drone-based products).

sgsR is being actively developed, so you may encounter bugs. If that happens, please report your issue here by providing a reproducible example.

Example usage :bar_chart:

#--- Load mraster files ---#
r <- system.file("extdata", "mraster.tif", package = "sgsR")

#--- load the mraster using the terra package ---#
mraster <- terra::rast(r)

#--- apply quantiles algorithm to mraster ---#
sraster <- strat_quantiles(mraster = mraster$zq90, # use mraster as input for stratification
                           nStrata = 4) # produce 4 strata
                        
#--- apply stratified sampling ---#
existing <- sample_strat(sraster = sraster, # use sraster as input for sampling
                         nSamp = 200, # request 200 samples
                         mindist = 100, # samples must be 100 m apart
                         plot = TRUE) # plot output

Resources & Vignettes :books:

Check out the package documentation to see how you can use sgsR functions for your work.

sgsR was presented at the ForestSAT 2022 Conference in Berlin. Slides for the presentation can be found here.

Collaborators :woman: :man:

We are thankful for continued collaboration with academic, private industry, and government institutions to help improve sgsR. Special thanks to to:

CollaboratorAffiliation
Martin QueinnecUniversity of British Columbia
Joanne C. WhiteCanadian Forest Service
Piotr TompalskiCanadian Forest Service
Andrew T. HudakUnited States Forest Service
Ruben ValbuenaSwedish University of Agricultural Sciences
Antoine LeBoeufMinistère des Forêts, de la Faune et des Parcs
Ian SinclairMinistry of Northern Development, Mines, Natural Resources and Forestry
Grant McCartneyForsite Consultants Ltd.
Jean-Francois PrieurUniversité de Sherbrooke
Murray Woods(Retired) Ministry of Northern Development, Mines, Natural Resources and Forestry

Funding :raised_hands:

Development of sgsR was made possible thanks to the financial support of the Canadian Wood Fibre Centre’s Forest Innovation Program.

Metadata

Version

1.4.5

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows