Spatial Indexing Techniques

The cluster focuses on discussions of various spatial indexing algorithms and data structures such as R-trees, quadtrees, geohashes, H3, S2, and Hilbert curves for efficient geospatial queries and point lookups.

➡️ Stable 0.6x Databases
1,287
Comments
20
Years Active
5
Top Authors
#7866
Topic ID

Activity Over Time

2007
6
2008
7
2009
21
2010
48
2011
43
2012
61
2013
38
2014
76
2015
89
2016
69
2017
92
2018
105
2019
82
2020
68
2021
95
2022
72
2023
102
2024
109
2025
94
2026
10

Keywords

RAM e.g eng.uber TIL McSherry HN christianperone.com S2 E.g medium.com spatial tree indexing search trees index curves filling zone queries

Sample Comments

cmp0 Apr 27, 2014 View on HN

Sounds like an R* tree or some variant of that?

joe563323 Dec 26, 2016 View on HN

Another suggestion. Implement the R-tree.

robochat May 17, 2021 View on HN

There has been a lot of work in this area. There is no best algorithm, it depends upon the problem that you are trying to solve. However, I think that r-trees have advantages over k-d trees for this 2d case. Alternatively, there are Quadtrees which have different trade-offs to r-trees. A very different approach is to use space-filling curves to reduce the 2d problem to a 1d problem; this approach is normally called geohashing. If you search on these terms then you can rapidly find resources and

meritt Nov 14, 2012 View on HN

Add geospatial to your comparison chart please. The way in which these implement support varies widely in performance and accuracy. I've yet to find one that actually uses R-Trees. Geohashes seem to be all the rage these days.

de6u99er Jul 22, 2022 View on HN

Ever heard of geospatial hierarchical Indices?E.g. Uber's H3 index or Google's S2 index.

decafb Jul 23, 2017 View on HN

For reference: The generic name what op does is "spatial indexing". There is an algorithm for efficiently working with such data called Hilbert R-tree (https://en.wikipedia.org/wiki/Hilbert_R-tree). But there are alternatives (see https://en.wikipedia.org/wiki/

anubp Jul 20, 2020 View on HN

A deep dive into how to choose the right polygon for spatial indexing and why hexabins might be a better choice than Geohashes in some cases.

heydenberk Aug 17, 2015 View on HN

This is called a quadtree. Here's a comparison: http://blog.notdot.net/2009/11/Damn-Cool-Algorithms-Spatial-...

geophile Apr 28, 2017 View on HN

Wow, spatial indexing day on HN.Why not use a space-filling curve, and any convenient 1-d search structure that parallelizes easily?

moreresearchplz Mar 30, 2023 View on HN

Like to see comparison to when they use a spatial index like strtree or rtree.