Accelerating Point-in-Polygon Predicates via Algebraic Hash-Joins and Discrete Global Grids at Scale

2026-07-09Databases

Databases
AI summary

The authors explore how traditional methods for checking if points lie inside polygons are slow for large datasets. They study Discrete Global Grid Systems (DGGS), which break maps into cells to speed up these queries using fast joins. The authors created a dashboard to compare four DGGS types, showing that converting data on-the-fly can be slow but pre-processing the data removes this delay. Their demonstration reveals that with pre-indexed data, all DGGS types perform similarly fast, making large spatial queries efficient.

point-in-polygon queryDiscrete Global Grid SystemsDGGSspatial indexingDuckDBvectorized executionH3 gridS2 gridpre-indexingspatial join
Authors
Levente Juhasz
Abstract
Traditional vector-based point-in-polygon queries rely on computationally expensive geometric predicates that scale poorly for massive datasets, even when accelerated by spatial indices. Discrete Global Grid Systems (DGGS) offer a scalable alternative by discretizing geometries into hierarchical cells, transforming complex spatial relations into constant-time relational hash-joins. However, adopting a DGGS introduces an overhead to encode data, and current grid implementations exhibit a significant performance ``tooling gap.'' In this demonstration, we present an interactive dashboard that empirically evaluates these computational tradeoffs across four DGGS implementations (H3, S2, A5, and ISEA4H) using DuckDB. Through progressive scenarios, the platform visualizes the overhead of on-the-fly encoding and demonstrates how pre-indexing spatial datasets eliminates this overhead. Ultimately, the demo proves that when data is pre-indexed, all DGGS regardless of their mathematical complexity or tooling converge to sub-second join latencies, unlocking the throughput of modern vectorized execution engines.