Skip to contents

Core

Create grids and assign points to cells

Working with Results

Extract and convert HexData

grid_info()
Get Grid Specification
cells()
Get Cell IDs
n_cells()
Get Number of Cells
is_hex_grid()
Check If an Object Is a HexGridInfo
is_hex_data()
Check If an Object Is a HexData
hex_summarize()
Summarize Data by Hex Cell
hex_smooth()
Smooth Cell Values Over Neighbouring Cells
hex_aggregate()
Aggregate Cell Values to a Coarser Resolution
hex_zonal()
Zonal Statistics for Hex Cells
hex_extract()
Extract Raster Values at Hex Cell Centers

Grid Generation

Create grids over regions

grid_rect()
Generate a Rectangular Grid of Hexagons
grid_global()
Generate a Global Hexagon Grid
grid_clip()
Clip Hexagon Grid to Polygon Boundary
cell_to_sf()
Convert Cell IDs to sf Polygons
lonlat_to_cell()
Convert Longitude/Latitude to Cell ID
cell_to_lonlat()
Convert Cell ID to Longitude/Latitude
get_parent()
Get Parent Cell
get_children()
Get Children Cells
get_siblings()
Sibling Cells

Cell Operations

Relations between cells and cell sets

get_neighbors()
Get Neighboring Cells
hex_distance()
Grid Distance Between Cells
is_pentagon()
Detect Pentagon Cells
hex_compact()
Compact Hex Cells
hex_uncompact()
Uncompact Hex Cells
hex_sample()
Random Points Inside Cells

H3 Interoperability

Cross-grid mapping and per-cell area

h3_crosswalk()
Crosswalk Between ISEA and H3 Cell IDs
cell_area()
Compute Per-Cell Area in km²
import_h3()
Import External H3 Cell IDs into hexify
dggrs_definition()
Definition of a Grid as a Discrete Global Grid Reference System

Cell Metrics

Shape and spacing of a grid’s cells

cell_metrics()
Shape Metrics of Cells: Area, Perimeter and Compactness
wall_metrics()
Spacing Metrics of Neighbouring Cells: Wall Length, Centre Distance and Cell Wall Midpoint Ratio
projection_distortion()
Distortion of a Grid's Face Projection
projection_stages()
Points Through the Steps of Snyder's Projection

Visualization

Plotting functions

hexify_heatmap()
Create a ggplot2 Visualization of Hexagonal Grid Cells
plot_grid()
Plot Hexagonal Grid Clipped to a Polygon Boundary
plot_world()
Quick World Map Plot
net_layout()
Lay Out the Faces of a Grid's Solid in the Plane
net_project()
Place Points on a Net Layout
net_cells()
The Parts of Cells on a Net Layout
hex_rays()
Ray Glyphs for Cell Values
hex_triangles()
The Triangles of Cells Towards Each Neighbour
hex_globe()
Interactive Globe of a Grid
hex_globe_png()
Save a Globe as a PNG Image
hexify_world
Simplified World Map
globe_centers
Globe Center Presets
hex_browse()
Interactive Hex Map

dggridR Compatibility

Interoperability with dggridR

as_dggrid() format(<dggs>) print(<dggs>)
Convert hexify Grid to 'dggridR'-compatible Grid Object
from_dggrid()
Convert 'dggridR' Grid Object to hexify_grid
dggrid_is_compatible()
Validate 'dggridR' Grid Compatibility with hexify
dggrid_43h_sequence()
Create DGGRID 43H Aperture Sequence
hexify_grid() format(<hexify_grid>) print(<hexify_grid>)
Create a Legacy Grid Specification
dgearthstat()
Get Grid Statistics for Whole-Body Coverage
dgverify()
Verify Grid Object
hexify_compare_resolutions()
Compare Grid Resolutions

Low-Level API

Direct access to projection and coordinate transforms

hexify_forward()
Forward Face Projection
hexify_forward_to_face()
Forward Projection to Specific Face
hexify_inverse()
Inverse Face Projection
hexify_which_face()
Determine Which Face Contains a Point
hexify_build_icosa()
Set the Default Icosahedron Orientation
hexify_face_centers()
Get Face Centers of a Solid
hexify_grid_rect()
Generate a Rectangular Grid of Hexagon Polygons
hexify_grid_global()
Generate a Global Grid of Hexagon Polygons
hexify_grid_to_cell()
Convert Longitude/Latitude to Cell ID Using a Grid Object
hexify_grid_cell_to_lonlat()
Convert Cell ID to Longitude/Latitude Using a Grid Object
hex_corners_to_sf()
Build an sf POLYGON from Six (lon, lat) Corner Pairs
dg_closest_res_to_area()
Find Closest Resolution for Target Cell Area
hexify_area_to_eff_res()
Convert Area to Effective Resolution
hexify_eff_res_to_area()
Convert Effective Resolution to Area
hexify_eff_res_to_resolution()
Convert Effective Resolution to Index Resolution
hexify_resolution_to_eff_res()
Convert Index Resolution to Effective Resolution
hexify_compare_indices()
Compare Two Indices
hexify_default_index_type()
Get Default Index Type for Aperture
hexify_is_valid_index_type()
Check If Index Type Is Valid for Aperture
cell_to_index()
Convert Cell ID to Hierarchical Index String
index_to_cell()
Convert Hierarchical Index to Cell ID
hexify_get_children()
Get Children Indices
hexify_get_parent()
Get Parent Index
hexify_get_resolution()
Get Index Resolution
hexify_z7_canonical()
Get Canonical Form of Z7 Index
hexify_roundtrip_test()
Round-Trip Accuracy Test

Internal

Package internals

hexify-package
hexify: Equal-Area Hex Grids on the Snyder ISEA Icosahedron
new_hex_data()
Create a HexData Object (Internal)
extract_grid()
Extract Grid from Various Objects
calculate_resolution_for_area()
Calculate Resolution for Target Area
hexify_grid_to_HexGridInfo()
Convert Legacy hexify_grid to HexGridInfo
HexGridInfo_to_hexify_grid()
Convert HexGridInfo to Legacy hexify_grid