create_raster: Create raster

View source: R/create_raster.R

create_rasterR Documentation

Create raster

Description

Create raster of equally spaced cells. The distance between centre of cells in both x and y dimension is equal to cell_size.

Usage

create_raster(geometry, cell_size, side_offset = 0)

Arguments

geometry

sf data.frame containing geometry which should be cover by the raster.

cell_size

numeric specifying the distance for equally spaced cells.

side_offset

numeric specifying the side offset, distance added to the convex hull of input geometry to generate raster for KDE. Good estimate is usually the same value as band width of KDE.

Value

Raster-class

Examples

library(sf)
nc <- st_read(system.file("shape/nc.shp", package = "sf")) %>% st_transform(32031)
raster <- create_raster(nc, cell_size = 100000)


SpatialKDE documentation built on March 7, 2023, 6:25 p.m.