liveBook · Manning

Bounding box

As explained in Just Use Postgres!

A bounding rectangle is a rectangular region that encloses the spatial extent of a geometric object or set of objects.

A bounding box is a rectangle that defines the spatial extent and position of a geometric object or area in two-dimensional space. It encloses geometries such as points, polygons, and line segments. section 10.6

Geospatial indexes store bounding boxes rather than complete coordinates or shapes. During a search, the database quickly identifies boxes within or intersecting a target area and skips unrelated geometries. section 10.6

GiST uses bounding boxes hierarchically:

  • Groups geometries into large boxes, recursively splits them into smaller boxes, and reaches leaf boxes containing references to the actual geometries. section 10.6
  • SP-GiST divides space into non-overlapping quadrant boxes around selected centroids, then subdivides those quadrants. section 10.6

How Just Use Postgres! covers it

How deep it goes
Defines rectangles and explains hierarchical indexing, but stops short of geometric construction or query syntax.
Examples
Uses points, polygons, line segments, hierarchical GiST regions, and SP-GiST quadrant boxes.
What it assumes
Assumes familiarity with geometries, coordinates, dimensions, and spatial reference systems.
What you can do after
Evaluate how spatial indexes narrow searches by traversing bounding boxes instead of scanning every geometry.
How it connects
Connects bounding boxes to geospatial indexes, GiST, SP-GiST, geometric objects, and spatial reference systems.

Also explained in

Compare how 8 books explain bounding box →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Just Use Postgres!. The section links point to the parts of the book it draws on.