Description

spatialsampler

Simple Spatial Sampling Method (S3M)

Calculate

calculate_area()

Function to calculate the area size of the resulting hexagon in a hexagonal grid and the area size of the resulting triangle in a triangular grid for a specified value of d (in kilometres) used in the simple spatial sampling method (S3M).

calculate_d()

Function to calculate the distance d given an area size (in square kilometres) of a hexagon in a hexagonal spatial grid determining spatial resolution of spatial sampling

calculate_height()

Calculate height (distance from north to south) of S3M grid given a value of d

calculate_length()

Calculate length (distance from east to west) of S3M grid given a value of d

calculate_n()

Function to calculate the number of hexagonal grids

Sample

create_buffer()

Function to create a buffer around a SpatialPolygons or SpatialPolygonsDataFrame object. This is a wrapper for gBuffer() function from package rgeos adding transformation of planar coordinates to appropriate projected coordinates to enable creation of buffer.

create_s3m_grid()

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

create_sp_grid()

Function to create sampling grids as per CSAS or S3M specifications. This is a wrapper function for spsample() function in sp package that adds arguments needed to implement CSAS and S3M-specific sampling.

get_nearest_point()

Function to select nearest community to a given sampling point (usually the centroid of a square grid for CSAS or of a hexagonal grid for S3M) using geodesic calculations based on a specified reference ellipsoid

get_nn()

Function to select nearest community to a given sampling point (usually the centroid of a square grid for CSAS or of a hexagonal grid for S3M) based on a nearest neighbour algorithm using Euclidean calculations

get_tri()

A wrapper function to gDelaunayTriangulation() to perform Delaunay triangulation with additional options to specify thresholds for suppressing long sided triangles

nearest_point()

Function to select nearest community to a given sampling point (usually the centroid of a square grid for CSAS or of a hexagonal grid for S3M)

vary_density()

Adjust triangulation by by dividing a densely populated triangle into smaller triangles by adding 3 points at the middle of each side of the triangle

Utility

find_utm_hemisphere()

Find UTM hemisphere based on a longitude and latitude GPS location.

find_utm_zone()

Find the UTM zone based on a longitude and latitude GPS location.

get_utm()

Get the appropriate UTM projection string given a longitude and latitude coordinate reference system values.

Data

countryCentroid

A dataframe of country centroids

map_projections

A dataset of UTM projections

gedaref_villages

A dataset of village names of Gedaref State, Sudan with data on coordinate locations

sennar_villages

A dataset of village names of Sennar State, Sudan with data on coordinate locations

sudan01

A map dataset of class SpatialPolygonsDataFrame of level 1 administrative units (states) of Sudan

sudan02

A map dataset of class SpatialPolygonsDataFrame of level 2 administrative units (localities) of Sudan