Random_Stratified_Min_Dist: Stratify a raster Stack into the best fitting classes

View source: R/Random_Stratified_Min_Dist.R

Random_Stratified_Min_DistR Documentation

Stratify a raster Stack into the best fitting classes

Description

Stratify a raster Stack into the best fitting classes

Usage

Random_Stratified_Min_Dist(
  ClassRaster = NULL,
  MinDist = NULL,
  BorderDist = NULL,
  n = NULL,
  n_to_test = 100
)

Arguments

ClassRaster

a raster with the classes of your site as integers.

MinDist

Minimum distance of a random point to the sampling points and cells with other classes.

BorderDist

Minumum distance of a random point to the border of its class, if NULL if reverst to MinDist.

n

Number of points per class can be one number or a vector specifying de number per class.

n_to_test

Number of points to test for the minimum distance.

Value

An sf with the points and their classes

Examples

data(Bios)

library(terra)

Bios <- terra::unwrap(Bios)

a <- Stratify(Bios)


plot(a$FinalStack, colNA = "black")

FinalRaster <- a$FinalStack

Points <- Random_Stratified_Min_Dist(ClassRaster = FinalRaster,
                                     MinDist = 2000,
                                     n = 30,
                                     n_to_test = 100)


Sustainscapes/GeoStratR documentation built on Aug. 9, 2024, 9:41 p.m.