Skip to contents

Grids

Build and tune hexagonal / rectangular grids over a study area.

create_grid()
Create hexagonal or square grids for spatial analysis
create_single_grid()
Build the grid for a single study area (internal)
find_hex_cell_size_for_target_cells()
Find a hexagonal cell size that yields approximately a target number of cells
get_utm_crs()
Get an appropriate UTM CRS for a study area

Raster extraction

Pull raster values into grid cells.

extract_raster_data()
Extract raster data into a hexagonal grid

Topology and smoothing

Compute neighbour topology and apply N-order spatial smoothing.

compute_topology()
Compute spatial topology and weights for hexagonal smoothing
smooth_variables()
Apply spatial smoothing to variables on a hexagonal grid

Hex measurement helpers

Internal

hex_msg()
Internal verbose-print helper
ordinal_suffix()
Ordinal suffix for an integer (internal)
validate_smoothing_inputs()
Validate inputs to the smoothing functions (internal)
smooth_variables_r_fallback()
R fallback for N-order spatial smoothing
estimate_avg_neighbor_distance()
Estimate average distance between first-order neighbours (internal)
compute_neighbors_n_orders()
Compute neighbours for N orders (internal, vectorised set-based BFS)
compute_weights_n_orders()
Compute weights for N orders (internal)