Understanding spatial indexing
Geospatial datasets are often very large files, easily reaching hundreds of megabytes or even several gigabytes in size. Geospatial software can be quite slow in trying to repeatedly access large files when performing analysis.
As discussed briefly in Chapter 1, Learning about Geospatial Analysis with Python, spatial indexing creates a guide, which allows the software to quickly locate query results without examining every single feature in the dataset. Spatial indexes allow the software to eliminate possibilities and perform more detailed searches or comparisons on a much smaller subset of the data.
Spatial indexing algorithms
Many spatial indexing algorithms are derivatives of well-established algorithms that have been used on non-spatial information for decades. The two most common spatial indexing algorithms are quadtree index and R-tree index. There is a three-dimensional counterpart to the Quadtree index called an octree data structure...