The S2 Hierarchical Discrete Global Grid as a Nexus for Data Representation, Integration, and Querying Across Geospatial Knowledge Graphs

Rui Zhu, Shirly Stephen, Mitchell Faulk, Krzysztof Janowicz, Colby K. Fisher, Thomas Thelen, Rui Zhu 0008, Pascal Hitzler, Cogan Shimizu, Kitty Currier, Mark Schildhauer, Dean Rehberger, Zhangyu Wang, Antrea ChristouarXiv 2024 · DOI

Abstract

Geospatial Knowledge Graphs (GeoKGs) are increasingly vital for cross-domain AI applications, yet they face significant scalability hurdles due to the computational overhead of high-precision vector geometries and the traditional divide between raster and vector data formats. This paper proposes the integration of Google’s S2 Geometry—a hierarchical Discrete Global Grid System (DGGS)—as a foundational indexing and representation layer. By "quantizing" complex spatial data into discrete S2 cells, we enable "topological enrichment," transforming expensive geometric calculations into efficient graph traversals. Our implementation within the KnowWhereGraph (KWG) framework demonstrates up to 100x speedups in spatial querying and provides a robust mechanism for integrating disparate datasets across scientific domains.

Introduction: The Performance Bottleneck in GeoKGs

While GeoKGs offer powerful semantic reasoning capabilities, they suffer from three primary "performance killers" that limit their utility at scale. First, Data Volume: storing high-precision geometries (e.g., coastlines with tens of thousands of vertices) as RDF literals is storage-intensive. Second, Computational Complexity: standard GeoSPARQL queries require on-the-fly geometric math (like polygon intersections) that becomes intractable as datasets scale to national or global levels. Finally, the Raster-Vector Divide: integrating pixel-based satellite data with boundary-based vector data remains a manual and error-prone process.

Current graph databases often lack the native spatial indexing required to handle these challenges, frequently leading to query timeouts during complex spatial joins. This research addresses these issues by shifting spatial logic from the geometry engine to the graph engine using a discretized "spatial fabric."

Methodology: The S2 Grid as a Spatial Fabric

The core of our approach is the integration of Google’s S2 Geometry into the KnowWhereGraph. S2 is a DGGS that projects the Earth's surface onto a cube and uses a Hilbert space-filling curve to tessellate it into a hierarchy of cells. Unlike other systems, S2 provides a stable, multi-resolution framework that can represent everything from global regions to square-centimeter plots.

Comparison of Discrete Global Grid Systems (DGGS), highlighting (a) OpenEAGGR, (b) the square-based S2 grid used in this study, and (c) the hexagonal H3 grid.

We employ two primary quantization strategies:

  1. Topological Enrichment: Instead of calculating spatial relationships at query time, we pre-compute the S2 cells occupied by features. Relationships such as sfWithin or sfTouches are materialized as edges in the graph. Spatial queries are thus reduced to simple graph traversals.
  2. Grid-Based Discretization: Raster data (e.g., cropland types) and complex vector data (e.g., soil maps) are transformed into S2-cell summaries. This "flattens" multi-scale data into a common format, allowing for efficient 1:1 grid mapping and data fusion.

Implementation and Data Integration

The proposed framework was evaluated using the KnowWhereGraph (v3.0), a massive knowledge graph containing over 28 billion triples. The system integrates diverse datasets, including the Soil Survey Geographic Database (SSURGO) and the USDA Cropland Data Layer (CDL).

The KnowWhereGraph (KWG) schema architecture, showing the integration of spatial features (geo:Feature) with temporal entities and environmental observations.

By utilizing S2 cells as a universal "glue," we successfully demonstrated cross-graph discovery between KWG and external graphs like SAWGraph (PFAS contamination) and UFOKN (urban flooding). The hierarchical nature of S2 also allows for "Semantic Compression," where large polygons are represented by a few high-level cells rather than thousands of low-level ones, significantly reducing triple counts.

Experimental Results

The performance gains achieved through S2 enrichment are dramatic. In comparative benchmarks:

  • Point-in-Polygon Queries: Locating hospitals within a specific region (Santa Barbara) took 0.3 seconds via S2, compared to 30 seconds using standard GeoSPARQL—a 100x speedup.
  • Complex Intersections: Queries involving road segments intersecting complex regions, which previously resulted in system timeouts, were completed in 5.7 seconds.
  • Federated Querying: The system successfully executed complex queries across three different knowledge graphs (e.g., linking PFAS releases to downstream water test results) using S2 cells as the common join key.

Discussion and Future Work

While the S2-based approach offers clear advantages, certain limitations remain. The spherical projection of S2 can cause visual distortion on flat maps, and the "Antimeridian Problem" requires specialized handling for cells crossing the +/- 180° longitude line. Additionally, researchers must be mindful of the Modifiable Areal Unit Problem (MAUP), where discretization resolution can introduce statistical bias.

Future research will focus on Graph Sharding, using S2 cells to physically partition knowledge graphs across multiple servers. This will ensure that the system can scale to meet the demands of truly global-scale geospatial data integration.

Summary updated

BibTeX
@misc{zhu2024s,
  author = {Rui Zhu and Shirly Stephen and Mitchell Faulk and Krzysztof Janowicz and Colby K. Fisher and Thomas Thelen and Rui Zhu and Pascal Hitzler and Cogan Shimizu and Kitty Currier and Mark Schildhauer and Dean Rehberger and Zhangyu Wang and Antrea Christou},
  title = {{The S2 Hierarchical Discrete Global Grid as a Nexus for Data Representation, Integration, and Querying Across Geospatial Knowledge Graphs}},
  year = {2024},
  eprint = {2410.14808},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.14808},
}
Figure