Creates a point sample of polygons where n is based on percent area
parea.sample( x, pct = 0.1, join = FALSE, min.samp = 1, max.samp = NULL, sf = 4046.86, stype = "hexagonal", ... )
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 |
A SpatialPointsDataFrame with polygon samples
This function results in an adaptive sample based on the area of each polygon
Jeffrey S. Evans <jeffrey_evans@tnc.org>
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')#> sampling 1 of 2 #> sampling 2 of 2