This function divides a shapefile into pixels so it can be used to create a
pixel map with build_pmap
.
pixelate(geoData = NULL, file = NULL, layer = NULL, pixelSize = 40, id = "id")
An object of class "SpatialPolygons" or "SpatialPolygonsDataFrame".
A shapefile pathway.
Name of geoData layer (see documentation for
read_sf
for more information).
An integer. Larger values result in smaller pixels.
The ID column shared by the geoData object and the dataset with estimates and errors.
This function can take several minutes to run depending on the size of the shapefile. Within this function, the projection of the spatial object is removed and then returned to the original projection.