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

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".

Source

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

Value

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

Examples

# 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")
#> Warning: Discarded datum WGS_1984 in CRS definition, #> but +towgs84= values preserved
#> Warning: Discarded datum Unknown based on WGS84 ellipsoid in CRS definition
#> Warning: CRS object has comment, which is lost in output
#> Warning: Discarded datum Unknown based on WGS84 ellipsoid in CRS definition, #> but +towgs84= values preserved
#> Warning: Discarded datum Unknown based on Clarke 1880 mod. ellipsoid in CRS definition, #> but +towgs84= values preserved
#> Warning: CRS object has comment, which is lost in output
#> Warning: Discarded datum Unknown based on Clarke 1880 mod. ellipsoid in CRS definition, #> but +towgs84= values preserved
#> Warning: Discarded datum WGS_1984 in CRS definition, #> but +towgs84= values preserved
#> Warning: CRS object has comment, which is lost in output
#> Warning: Discarded datum Unknown based on Clarke 1880 mod. ellipsoid in CRS definition, #> but +towgs84= values preserved
#> Warning: Discarded datum WGS_1984 in CRS definition, #> but +towgs84= values preserved
#> class : SpatialLines #> features : 47 #> extent : 32.80014, 35.83637, 11.61406, 14.21312 (xmin, xmax, ymin, ymax) #> crs : +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs