| grid_rect | R Documentation |
Creates hexagon polygons covering a rectangular geographic region. For H3 grids, all cells that overlap the bounding box are included (not just cells whose center falls inside), ensuring full spatial coverage.
grid_rect(bbox, grid)
bbox |
Bounding box as c(xmin, ymin, xmax, ymax), or an sf/sfc object |
grid |
A HexGridInfo object specifying the grid parameters |
sf object with hexagon polygons
grid_global for global grids
grid <- hex_grid(area_km2 = 5000)
europe <- grid_rect(c(-10, 35, 30, 60), grid)
plot(europe)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.