1

The default function in raster::rasterize is to see if a point is within a polygon and if yes, make a cell. This results in that some of the outer parts of the polygon is not covered by the new raster. Is it possible to use rasterize (or fasterize or whatever) in a way, so that the entire polygon is covered?

1
  • 2
    You could maybe buffer the polygons by half-a-cell and then rasterise, or rasterise and then buffer the raster by a cell using a "grow" operation. Alternatively you have to form a rectangle for each of your raster cells and do a load of polygons-raster intersections...
    – Spacedman
    Mar 18, 2019 at 15:33

1 Answer 1

-1

Make a fishnet, select cells in the fishnet that overlap the polygon, and then rasterize the cells selected. 'Fishnet' is the ESRI term for it. You can use the SF package to do it in R, as per the answer in this link.

1
  • Not sure what you mean by fishnet? Mar 19, 2019 at 8:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.