make_grid: Creates rectangular grid for emission allocation

View source: R/make_grid.R

make_gridR Documentation

Creates rectangular grid for emission allocation

Description

make_grid creates a sf grid of polygons. The spatial reference is taken from the spatial object.

Usage

make_grid(spobj, width, height = width, crs = 3857)

Arguments

spobj

A spatial object of class sp or sf.

width

Width of grid cell. It is recommended to use projected values.

height

Height of grid cell.

crs

coordinate reference system in numeric format from http://spatialreference.org/ to transform/project spatial data using sf::st_transform. The default value is 3857, Pseudo Mercator

Value

A grid of polygons class 'sf'

Examples

## Not run: 
data(net)
grid <- make_grid(net, width = 0.5/102.47) #500 mts
plot(grid, axes = TRUE) #class sf
# make grid now returns warnings for crs with form +init...
#grid <- make_grid(net, width = 0.5/102.47) #500 mts


## End(Not run)

vein documentation built on May 29, 2024, 7:20 a.m.