API

Types

DGGCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

DGGGrid

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

FULLER3H

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

FULLER3HCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

FULLER43H

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

FULLER43HCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

FULLER4D

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

FULLER4DCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

FULLER4H

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

FULLER4HCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

FULLER4T

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

FULLER4TCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

FULLER7H

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

FULLER7HCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

H3Cell

H3Cell(index::UInt64)
H3Cell(base::Integer, digits::AbstractVector{<:Integer})
H3Cell(coord::LonLat, res::Integer=10)
H3Cell(str::AbstractString)

A single cell in the H3 grid. Wraps a UInt64 index that encodes the base cell (0–121), resolution (0–15), and refinement digits (0–6).

Examples

H3Cell(LonLat(-75.0, 54.0), 7)
H3Cell(121, [1, 5, 0])

H3Grid

H3Grid()

The H3 hexagonal discrete global grid system developed by Uber. Uses CRS EPSG:4326 (WGS84 longitude/latitude).

IGEO7Cell

IGEO7Cell(index::UInt64)
IGEO7Cell(base::Integer, digits::AbstractVector{<:Integer})
IGEO7Cell(coord::LonLat, res::Integer)
IGEO7Cell(str::AbstractString)

A single cell in the IGEO7 grid. Wraps a UInt64 index encoding a 4-bit base cell (0–11) and up to 20 three-bit digits (0–6, padding = 7).

Examples

IGEO7Cell(LonLat(-75.0, 54.0), 3)
IGEO7Cell(0, [1, 3, 0])

IGEO7Grid

IGEO7Grid()

An aperture-7 hexagonal discrete global grid based on the ISEA icosahedron. Uses 12 pentagonal base cells at icosahedron vertices with Z7 hierarchical indexing. CRS is EPSG:4326 (WGS84 longitude/latitude).

Cell count at resolution r: 10 * 7^r + 2.

ISEA3H

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

ISEA3HCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

ISEA43H

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

ISEA43HCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

ISEA4D

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

ISEA4DCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

ISEA4H

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

ISEA4HCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

ISEA4T

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

ISEA4TCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

ISEA7H

DGGGrid{Proj, Ap, Topo}

A discrete global grid parameterized by projection (Proj), aperture (Ap), and topology (Topo).

  • Proj: :isea (Snyder equal-area) or :fuller (Dymaxion)
  • Ap: 3, 4, 7, or 43 (mixed 4-3)
  • Topo: :hex, :tri, or :diamond

Examples

ISEA3H()   # ISEA aperture-3 hexagonal grid

ISEA7HCell

DGGCell{Proj, Ap, Topo}(index::UInt64)
DGGCell{Proj, Ap, Topo}(base::Integer, digits::AbstractVector{<:Integer})
DGGCell{Proj, Ap, Topo}(coord::LonLat, res::Integer)
DGGCell{Proj, Ap, Topo}(str::AbstractString)

A single cell in a DGG grid. Wraps a UInt64 index encoding a 5-bit base face (0-19) and hierarchical refinement digits.

Examples

ISEA3HCell(LonLat(-75.0, 54.0), 5)
ISEA3HCell(0, [1, 2, 0])

LonLat

LonLat(lon, lat)
LonLat((lon, lat))

A point on the Earth’s surface in longitude/latitude (degrees). Implements the GeoInterface PointTrait so it works with plotting and spatial libraries.

Examples

LonLat(-75.0, 54.0)

Functions

azimuth

azimuth(a, b)

Initial bearing (degrees clockwise from North) from point a to point b.

base_cell

base_cell(cell::AbstractCell)

Return the base cell index (integer) of a cell.

cells

cells(::Type{T}, geom, res; kw...) where {T <: AbstractCell}

Return the grid cells of type T at resolution res that cover geom.

Dispatches on the GeoInterface geometry trait of geom and supports points, multipoints, lines, linestrings, polygons, multipolygons, and Extents.Extent.

children

No documentation found for public binding GlobalGrids.children.

GlobalGrids.children is a Function.

# 3 methods for generic function "children" from GlobalGrids:
 [1] children(o::GlobalGrids.H3Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/h3.jl:181
 [2] children(o::GlobalGrids.IGEO7Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/igeo7.jl:416
 [3] children(o::GlobalGrids.DGGCell{P, A, T}) where {P, A, T}
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/dgg/hierarchy.jl:9

decode

No documentation found for public binding GlobalGrids.decode.

GlobalGrids.decode is a Function.

# 3 methods for generic function "decode" from GlobalGrids:
 [1] decode(o::GlobalGrids.H3Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/h3.jl:169
 [2] decode(o::GlobalGrids.IGEO7Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/igeo7.jl:388
 [3] decode(o::GlobalGrids.DGGCell{P, A, T}) where {P, A, T}
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/dgg/types.jl:154

destination

destination(origin::LonLat, azimuth°::Real, m::Real)

Destination point given a starting origin, azimuth° (degrees clockwise from North), and distance m (meters).

destination(cell::AbstractCell, azimuth_deg, m)

Return a new cell of the same type and resolution whose centroid is m meters from cell at the given bearing.

dggcells

dggcells(geom, res; grid=ISEA3H(), kw...)

Convenience wrapper for cells(DGGCell{...}, geom, res; kw...).

encode

encode(cell::AbstractCell)

Hex-string representation of a cell’s raw UInt64 index.

grid

No documentation found for public binding GlobalGrids.grid.

GlobalGrids.grid is a Function.

# 3 methods for generic function "grid" from GlobalGrids:
 [1] grid(o::GlobalGrids.H3Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/h3.jl:144
 [2] grid(::GlobalGrids.IGEO7Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/igeo7.jl:380
 [3] grid(::GlobalGrids.DGGCell{P, A, T}) where {P, A, T}
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/dgg/types.jl:146

h3cells

h3cells(geom, res; kw...)

Convenience wrapper for cells(H3Cell, geom, res; kw...).

haversine

haversine(a::LonLat, b::LonLat)

Great-circle distance (meters) between two points using the Haversine formula.

haversine(a::AbstractCell, b::AbstractCell)

Great-circle distance (meters) between the centroids of two cells.

icosahedron

icosahedron(vertex=Point3d(0,0,1), azimuth=0.0)
icosahedron(preset::Symbol)

Create an icosahedron mesh on the unit sphere. A vertex is placed at vertex and the mesh is rotated by azimuth (radians) around that axis.

Preset orientations: :poles, :isea, :dymaxion.

Examples

icosahedron()
icosahedron(:isea)

igeo7cells

igeo7cells(geom, res; kw...)

Convenience wrapper for cells(IGEO7Cell, geom, res; kw...).

is_pentagon

No documentation found for public binding GlobalGrids.is_pentagon.

GlobalGrids.is_pentagon is a Function.

# 4 methods for generic function "is_pentagon" from GlobalGrids:
 [1] is_pentagon(o::GlobalGrids.H3Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/h3.jl:152
 [2] is_pentagon(o::GlobalGrids.IGEO7Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/igeo7.jl:384
 [3] is_pentagon(o::GlobalGrids.DGGCell{P, A, T}) where {P, A, T}
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/dgg/types.jl:150
 [4] is_pentagon(::GlobalGrids.AbstractCell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/GlobalGrids.jl:117

ncells

ncells(grid::AbstractGrid, res::Integer)

Total number of cells at resolution res.

pentagons

pentagons(grid::AbstractGrid, res::Integer)

Return the 12 pentagon cells at resolution res.

resolution

No documentation found for public binding GlobalGrids.resolution.

GlobalGrids.resolution is a Function.

# 3 methods for generic function "resolution" from GlobalGrids:
 [1] resolution(o::GlobalGrids.H3Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/h3.jl:148
 [2] resolution(o::GlobalGrids.IGEO7Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/igeo7.jl:382
 [3] resolution(o::GlobalGrids.DGGCell{P, A, T}) where {P, A, T}
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/dgg/types.jl:148

siblings

No documentation found for public binding GlobalGrids.siblings.

GlobalGrids.siblings is a Function.

# 3 methods for generic function "siblings" from GlobalGrids:
 [1] siblings(o::GlobalGrids.H3Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/h3.jl:190
 [2] siblings(o::GlobalGrids.IGEO7Cell)
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/igeo7.jl:426
 [3] siblings(o::GlobalGrids.DGGCell{P, A, T}) where {P, A, T}
     @ ~/work/GlobalGrids.jl/GlobalGrids.jl/src/dgg/hierarchy.jl:19