When you have been following the Spatial Index Sequence, it began with the necessity for multi-dimensional indexes and an introduction to space-filling curves, adopted by a deep dive into grid methods (GeoHash and Google S2) and tessellation (Uber H3).
On this put up, let’s discover the R-Tree knowledge construction (data-driven construction), which is popularly used to retailer multi-dimensional knowledge, resembling knowledge factors, segments, and rectangles.
For instance, contemplate the plan of a college structure under. We will use the R-Tree knowledge construction to index the buildings on the map.
To take action, we are able to place rectangles round a constructing or group of buildings after which index them. Suppose there’s a a lot larger part of the map signifying a bigger division, and we have to question all of the buildings inside a division. We will use the R-Tree to seek out all of the buildings inside (partially or totally contained) the bigger part (question rectangle).
Within the above determine, the pink rectangle signify the question rectangle, used to ask the…