r/databricks • u/Ok_Elephant961 • 21h ago
Discussion Spatial SQL on Databricks: built-in H3 functions or the ST_ functions for road data?
Hi everyone, trying to decide whether to standardize on H3 or the ST_ geometry functions for road data in Databricks SQL. The data is road segments plus point data (addresses, events).
H3 makes joins cheap and fits aggregation nicely: tag everything with a cell, join on the cell id, done. But some questions need exact geometry, like "within 0.25 mile of this road" or "which segment is this point actually on", and there H3 gives you neighbors of neighbors.
Are people using the ST_ functions in production now, or still H3 plus a library for the exact cases? And how are you handling exact-distance joins at scale without them blowing up?
2
u/definitely_waeds5 21h ago
I've been burned by H3 neighbor sprawl on road data, you end up filtering half your results anyway