interpolatePolyPoint: Interpolate points from polygon SPDF This function returns...

Description Usage Arguments Value Examples

View source: R/R-GIS.R

Description

Interpolate points from polygon SPDF This function returns (weighted) sample points in fine for every polygon in crude. Thus running it repeatedly gives you useful variation that reflects the interpolation uncertainty.

Usage

1
2
interpolatePolyPoint(crude, fine, weightCol = NULL, nSampleCol = 1,
  replace = TRUE, verbose = FALSE)

Arguments

crude

A SpatialPolygonsDataFrame.

fine

A SpatialPointsDataFrame.

weightCol

A column name in fine to weight the point sampling by, or NULL if no weighting is required

nSampleCol

Either a column name in crude containing number of elements of fineWithin to sample per polygon, or a number of points to sample per polygon

replace

A logical indicating whether to sample points from fine with replacement or not within each polygon of crude

verbose

Whether to output detailed error messages

Value

A SpatialPointsDataFrame containing

Examples

1
2
3
4
5
6
7
8
## Not run: 
replicate( 10, interpolatePolyPoint(
  crude=polySP, fine=pointSP,
  weightCol="pop", nSampleCol="z",
  replace=TRUE, verbose=TRUE ),
simplify=FALSE )

## End(Not run)

gsk3/taRifx.geo documentation built on May 17, 2019, 8:56 a.m.