create_s3m_grid: Create the rectangular S3M grid given a value of d of the...

Description Usage Arguments Value Source Examples

View source: R/create_grid_s3m.R

Description

Create the rectangular S3M grid given a value of d of the farthest distance of a village from a sampling point.

Usage

1
create_s3m_grid(input, d, buffer, country, output = "points")

Arguments

input

A class SpatialPolygons or SpatialPolygonsDataFrame object of the area to be gridded.

d

A numeric value for length (in kilometres) of the maximum distance of a village/community from a sampling point. This can be the output of the function calculate_d()

buffer

A numeric value for distance (in kilometres) to expand the borders of the given spatial object x. Negative values allowed.

country

Name of country where sampling area is located. This is used to determine the appropriate UTM projection to transform input

output

A character value specifying type of output required. Can be either of two options: "points" for a class SpatialPoints output of the sampling point locations based on the S3M grid or "lines" for a class SpatialLines output of the rectangular S3M grid. Default is "points".

Value

Either a class SpatialLines object if output is "lines" or a class SpatialPoints object if output is "points"

Source

based on S3M sampling approach designed by Mark Myatt and Ernest Guevarra

Examples

1
2
3
4
5
6
# S3M grid of Sennar state, Sudan based on a d of 12 kms
create_s3m_grid(input = sudan01[sudan01$STATE == "Sennar", ],
                d = 12,
                buffer = 6,
                country = "Sudan",
                output = "lines")

validmeasures/spatialsampler documentation built on Oct. 16, 2021, 3:15 a.m.