Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

parea.sample

Percent area sample


Description

Creates a point sample of polygons where n is based on percent area

Usage

parea.sample(
  x,
  pct = 0.1,
  join = FALSE,
  min.samp = 1,
  max.samp = NULL,
  sf = 4046.86,
  stype = "hexagonal",
  ...
)

Arguments

x

sp SpatialPolygonsDataFrame object

pct

Percent of area sampled

join

Join polygon attributed to point sample

min.samp

Minimum number of samples

max.samp

Maximum number of samples

sf

Scaling factor (default is meters to acres conversion factor)

stype

Sampling type ('random', 'regular', 'nonaligned', 'hexagonal')

...

Additional arguments passed to spsample

Value

A SpatialPointsDataFrame with polygon samples

Note

This function results in an adaptive sample based on the area of each polygon

Author(s)

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples

require(sp)
sr1=Polygons(list(Polygon(cbind(c(180114, 180553, 181127, 181477, 181294, 
  181007, 180409, 180162, 180114), c(332349, 332057, 332342, 333250, 333558, 
  333676, 332618, 332413, 332349)))),'1')
sr2=Polygons(list(Polygon(cbind(c(180042, 180545, 180553, 180314, 179955, 
  179142, 179437, 179524, 179979, 180042), c(332373, 332026, 331426, 330889, 
  330683, 331133, 331623, 332152, 332357, 332373)))),'2')
sr=SpatialPolygons(list(sr1,sr2))
srdf=SpatialPolygonsDataFrame(sr, data.frame(row.names=c('1','2'), PIDS=1:2))

ars <- parea.sample(srdf, pct=0.20, stype='random') 
  plot(srdf)
    plot(ars, pch=20, add=TRUE)

spatialEco

Spatial Analysis and Modelling Utilities

v1.3-6
GPL-3
Authors
Jeffrey S. Evans [aut, cre], Melanie A. Murphy [ctb], Karthik Ram [ctb]
Initial release
2021-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.