powered by
Creates hexagon polygons covering a rectangular geographic region.
hexify_grid_rect( minlon, maxlon, minlat, maxlat, area, aperture = 3L, resround = "nearest" )
sf object with hexagon polygons covering the specified region
Longitude bounds
Latitude bounds
Target cell area in km^2
Grid aperture: 3, 4, or 7
Resolution rounding: "nearest", "up", or "down"
grid_rect for the recommended S4 interface, hexify_grid_global for global grids
grid_rect
hexify_grid_global
Other sf conversion: hex_corners_to_sf(), hexify_cell_to_sf(), hexify_grid_global()
hex_corners_to_sf()
hexify_cell_to_sf()
hexify_grid_global()
library(hexify) library(sf) grid <- hexify_grid_rect( minlon = -10, maxlon = 20, minlat = 35, maxlat = 60, area = 5000 ) plot(st_geometry(grid), border = "gray")
Run the code above in your browser using DataLab