Developing knowledge about geographic space
The PostGIS documentation is an important tool for improving your understanding of spatial algorithms and how to execute efficient SQL queries. As we move past inquiry and into efficiency, it is important to pay attention to additional details. These will be explained as we move through the chapter.
Let’s begin by understanding spatial indexing. Unique to spatial databases, indexing is necessary to expedite searches and improve the speed of our queries.
But wait – you might be thinking – how do you index geometries? Isn’t that what makes a spatial database different? The simple answer is a spatial index is looking at bounding boxes—not simply the lines generated from their edges. Bounding boxes are rectangular polygons containing an object or an area of interest. Identified by xmax, xmin, ymax, and ymin, a bounding box is slightly different from an extent, as it can contain an extent but does not have...