2026-11-04 –, Tofanelli
Compaction reduces the storage cost of cell sets in hierarchical DGGSs. We
cover compaction along with efficient set membership querying, why the "gaps" in
mixed-resolution sets are merely an illusion, and a new co-compaction algorithm for
additional savings.
Note: This is the first talk in a pair, but this one stands completely on its own.
The second talk is "DGGS Set Design: Compaction-Aware Optimization".
We can denote a region on the globe with a set of cells from a DGGS like
H3, S2, or A5. Typically,
we select a single target resolution or level of the DGGS so that the cells tile nicely
without gaps or overlaps.
In a hierarchical DGGS, we can interpret a parent cell as logically representing
the set of its child cells. This is the main idea behind compaction. When
cell sets are large, we can often reduce the storage cost of the set by recursively
replacing full sets of child cells with their parents.
The interpretation of the compacted set is critical. Geometrically and
visually, this set can be unappealing, because it mixes cells of different
resolutions, which can cause undesirable gaps and overlaps. However,
if we interpret the set logically, where parent cells represent the descendant
cells at the target resolution, then the compacted set is logically identical
to the original set---no loss, errors, gaps, or overlaps.
The distinction between the geometric and logical interpretation of a compacted
set is also important when querying for set membership. A common use case occurs
when we have a collection of cell sets, and want to know which sets a query point
belongs to. For "flat" sets where all cells are the same target resolution, the query
is straightforward: convert your query point to a cell of the target resolution,
and then find the sets that contain the cell. We want to perform the same
query, but with the compacted form of the sets, and receive identical results.
We'll discuss simple algorithmic approaches to do so.
We extend this discussion to "co-compaction", which starts with
observing that we'll often see cell sets that almost
compact. For example, nearly all of a parent cell's descendants are present, but one is missing.
Normal compaction is stuck. However, we could
instead describe that region as "the parent cell, minus the one missing child,"
capturing in two cells what compaction would need many to express.
We generalize and formalize this idea, and describe an algorithm which exploits
the DGGS hierarchy to efficiently compute optimal co-compacted sets.
We share software for co-compaction of H3 cells with https://github.com/ajfriend/h3coco,
but note that these ideas immediately apply to any hierarchical DGGS.
In our experiments, co-compaction trims an additional 25–45% off the cell count
beyond ordinary compaction. We'll also discuss efficiently querying co-compacted sets.
AJ is a data scientist at Waymo, formerly a data scientist at Uber Eats and maintainer of H3 and H3-py.