Closed albhasan closed 1 year ago
Alber, good to hear from you! I really had some idle hope I would never have to return to that code, but alas. I noted that if you give flat_topped = TRUE
then there are no hexagons not intersecting with the bounding box, in your example. Maybe that is a hint for finding the solution, who knows.
It's good to hear from you too!
You're right, flat_topped fixes it. Thanks!
Cheers!
The documentation states that
st_make_grid
creates a hexagonal grid covering the bounding box of the given sf object. However, the top row of hexagons produced by the code below doesn't overlap the bounding box of the givensf
object.This issue could be related to #1229 but, as I'm not sure, I'd rather report it.
In this plot, the black square is nc's bounding box and the grid is in red.
This issue happens only when
square = FALSE
and at specific cellsizes (i.e. cellsizes 0.5, 1.4, 1.5).