sp2raster.Rd
Convert a SpatialPolygonDataFrame to a raster. (Wrapper for raster::rasterize() with some reasonable defaults for the ereefs package)
sp2raster(
sPdf,
xmn = 142.45,
ymn = -27.5,
resolution = 0.01,
xmx = NA,
ymx = NA,
r = NULL
)
SpatialPolygonDataFrame object, e.g. as output by poly2sp.
Minimum x value to use for the grid. Defaults to 142.45
Minimum y value for the grid. Defaults to -27.5
Grid resolution in degrees. Defaults to 0.01
Maximum x value for the grid. Defaults to max value from the SpatialPolygonDataFrame bounding box.
Maximum y value for the grid. Defaults to max value from the SpatialPolygonDataFrame bounding box.
A SpatialPolygonsDataFrame object, as used in the package 'sp'