BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//pretalx//talks.osgeo.org//foss4g-europe-2026//talk//HSFXR3
BEGIN:VTIMEZONE
TZID:EET
BEGIN:STANDARD
DTSTART:20001029T050000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
TZNAME:EET
TZOFFSETFROM:+0300
TZOFFSETTO:+0200
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20000326T040000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
TZNAME:EEST
TZOFFSETFROM:+0200
TZOFFSETTO:+0300
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:pretalx-foss4g-europe-2026-HSFXR3@talks.osgeo.org
DTSTART;TZID=EET:20260630T113000
DTEND;TZID=EET:20260630T120000
DESCRIPTION:Discrete Global Grid Systems (DGGS) are increasingly adopted as
  a unified spatial reference framework for organising and analysing multi-
 source geospatial data at global scale. Among hexagonal DGGS configuration
 s\, refinement ratio 7 systems exhibit particularly desirable properties: 
 they preserve hexagonal symmetry across refinement levels and produce unam
 biguous indexing hierarchies where each cell maps to exactly one parent (S
 ahr\, 2011). The recently introduced IGEO7 system and its associated Z7 hi
 erarchical integer indexing scheme (Kmoch et al.\, 2025) provide a pure ap
 erture 7 equal-area hexagonal DGGS implemented in the open-source DGGRID s
 oftware. While IGEO7/Z7 offers significant theoretical advantages over sys
 tems such as H3\, such as true equal-area cells versus H3’s ±50% cell s
 ize variation\, practical challenges remain in translating these advantage
 s into efficient\, scalable computational workflows. This paper addresses 
 three interconnected challenges: (1) the algorithmic foundations of Z7 nei
 ghbourhood computation using Generalised Balanced Ternary (GBT) arithmetic
  on the int64 bit-packed index\, (2) the alignment of Z7’s hierarchical 
 index structure with cloud-native storage layouts in Zarr via monotonic pa
 rent-based range indexing\, and (3) a practical demonstration through slop
 e gradient computation as a representative focal operation on hexagonal DG
 GS.\nA Z7 index is a 64-bit unsigned integer where the first 4 bits encode
  the base cell number (0–11\, corresponding to the 12 pentagonal cells a
 t the icosahedron vertices)\, and the remaining 60 bits encode up to 20 re
 solution digits at 3 bits each (values 0–6\, with 7 marking digits beyon
 d the cell’s resolution). This compact bit-packed representation enables
  efficient hierarchical operations through bitwise manipulation: parent ex
 traction requires only masking and setting trailing digit groups to 7\, wh
 ile resolution determination reduces to scanning for the first occurrence 
 of the sentinel value 7. The encoding ensures that all children of a given
  parent cell share a common bit prefix\, a property that is fundamental to
  both neighbourhood computation and storage optimisation.\nNeighbourhood f
 inding in Z7 leverages GBT arithmetic\, which is a generalisation of balan
 ced ternary to the three axes of a hexagonal grid (Sahr\, 2019). Each of t
 he six neighbours of a cell is computed by performing digit-wise addition 
 of a direction vector (digits 1–6) to the cell’s index implemented via
  bitshifting\, starting at the finest resolution digit and propagating car
 ries toward coarser levels. Because the aperture 7 grid alternates orienta
 tion between successive resolutions (approximately ±19.1° rotation)\, th
 e addition tables alternate between clockwise and counter-clockwise varian
 ts at odd and even resolutions respectively. Each per-digit operation invo
 lves a table lookup (a 7×7 matrix yielding both the result digit and a ca
 rry digit)\, making the overall algorithm O(r) in complexity where r is th
 e resolution. When the carry propagates beyond the first resolution digit\
 , the neighbour crosses into an adjacent base cell\, requiring a lookup in
  the icosahedral adjacency table and potential rotational corrections at p
 olar base cells. We present a Python/Numba implementation of this algorith
 m that operates directly on arrays of uint64 Z7 indices\, achieving vector
 ised batch neighbourhood computation suitable for large-scale raster-style
  analysis.\nThe hierarchical prefix property of Z7 indices\, where all chi
 ldren of a parent share a common bit prefix\, directly enables an efficien
 t storage layout for cloud-native Zarr archives. When Z7 indices at a give
 n resolution are sorted numerically\, cells within the same parent region 
 are stored contiguously. This creates a monotonic range index where any pa
 rent zone’s children can be retrieved through a simple range query on th
 e sorted 1-D index dimension. We describe how xarray-xdggs (XDGGS\, Kmoch 
 et al\, 2024) exploits this property: DGGS-indexed data is encoded as 1-D 
 Zarr arrays with the Z7 cell ID as the coordinate dimension (but stored on
 ly as the start and end IDs)\, and chunking boundaries are aligned with co
 arser-resolution parent boundaries (e.g.\, chunking at resolution N-4 or N
 -5 while storing data at resolution N). This alignment ensures that hierar
 chical queries\, i.e. aggregation from index children to logical parents\,
  or drill-down from parents to children\, traverse contiguous storage bloc
 ks\, minimising I/O operations in cloud-object-storage environments. The a
 pproach mirrors the storage optimisation patterns known from quad-trees ov
 erviews or the HEALPix nested indexing but extends naturally to aperture 7
  hierarchies. We also discuss how Zarr’s metadata attributes are used to
  record DGGS parameters (grid type\, indexing scheme\, refinement level)\,
  enabling self-describing archives that can be leveraged for large scale c
 omputations.\nAs a practical demonstration\, we implement a slope gradient
  computation\, a classical focal GIS operation in terrain analysis\, opera
 ting entirely within the Z7 index space. For each cell\, the algorithm ret
 rieves the six neighbours via GBT arithmetic\, obtains the elevation value
 s and their relative directions to each other\, calculates the elevation d
 ifferences along the three hexagonal axes onto two orthogonal components\,
  and computes the slope from the combined partial derivatives. This finite
 -difference approach\, adapted from Li et al. (2022)\, benefits from the u
 niform adjacency and equal weighting inherent to hexagonal cells\, elimina
 ting the directional bias present in rectangular grid slope computations. 
 We implement this using Xarray for data management\, Numba-accelerated fun
 ctions for batch Z7 neighbour lookups on uint64 arrays\, and demonstrate t
 he end-to-end workflow from Zarr-stored elevation data through to a Zarr-s
 tored slope product. All data is indexed by Z7 cell IDs without any interm
 ediate coordinate transformations.\nOur results show that the combination 
 of Z7’s bit-packed int64 representation\, GBT-based neighbourhood arithm
 etic\, and parent-aligned Zarr chunking provides a coherent\, performant s
 tack for DGGS-native geospatial analysis. The approach is implemented usin
 g open-source Python tools (Numba\, Xarray\, XDGGS\, Zarr) and is designed
  to integrate with emerging DGGS standards and cloud-native data infrastru
 cture.
DTSTAMP:20260605T005441Z
LOCATION:A01
SUMMARY:Efficient Neighbourhood Computation and Cloud-Native Storage for th
 e IGEO7 DGGS Using the Z7 GBT Indexing - Alexander Kmoch
URL:https://talks.osgeo.org/foss4g-europe-2026/talk/HSFXR3/
END:VEVENT
END:VCALENDAR
