GlobalGrids.jl

Intro to GlobalGrids.jl

Discrete global grids (DGGs) for Julia.

GlobalGrids provides three discrete global grid systems, all built on the icosahedron:

Grid System Description Aperture Resolutions
H3 Julia wrapper around Uber’s H3 C library 7 0–15
IGEO7 Pure-Julia aperture-7 hexagonal grid with Lambert azimuthal projection 7 0–20
DGG Parametric DGGRID-style grids (projection × aperture × topology) 3, 4, 7, 43 0–28

All grid cell types implement GeoInterface.jl and work with plotting (Makie) and spatial libraries (GeometryOps).

A great resource for learning about DGGs is https://discreteglobalgrids.org

Installation

using Pkg
Pkg.add(url = "https://github.com/RallypointOne/GlobalGrids.jl")

Quickstart

using GlobalGrids
import GeoInterface as GI

p = LonLat(-75.0, 54.0)

# H3 (Uber's grid)
h3 = H3Cell(p, 7)

# IGEO7 (pure Julia aperture-7)
ig = IGEO7Cell(p, 5)

# DGG (DGGRID-style, default ISEA aperture-3 hex)
dg = ISEA3HCell(p, 5)

# All cell types support the same interface:
GI.centroid(h3)      # center point
GI.coordinates(h3)   # boundary vertices
GI.area(h3)          # area in m²