gridCountry {GeoAdjust}R Documentation

Creates a grid of locations within the bounding box of the national borders of a country of interest.

Description

Creates a grid of locations within the bounding box of the national borders of a country of interest.

Usage

gridCountry(admin0 = NULL, res = NULL, target_crs = NULL)

Arguments

admin0

An sf class MULTIPOLYGON representing the country borders.

res

A value representing the resolution in kilometers.

target_crs

A projection string representing the desired coordinate reference system according to which the prediction grid will be constructed. The measurement unit of the target_crs should be in kilometers.

Value

A list. The first element of the list, predRast, is a SpatRaster object. The second element of the list, loc.pred, is an sf class POINT object containing coordinates of the cell centers (in target_crs) of the prediction raster.

Examples

path1 <- system.file("extdata", "geoData.rda", package = "GeoAdjust")
load(path1)
crs_KM = "+units=km +proj=utm +zone=37 +ellps=clrk80 +towgs84=-160,-6,-302,0,0,0,0 +no_defs"
grid = gridCountry(admin0 = adm0, res = 5, target_crs = crs_KM)

[Package GeoAdjust version 2.0.0 Index]