Chapter 1. What is a spatial database?
Figure 1.1. Pushpin madness!
Figure 1.2. Database with postgis extension installed
Figure 1.3. Basic geometries: a point, a linestring, and a polygon
Figure 1.4. Loading into the geometry data type
Figure 1.5. U.S. Route 1 in Maryland, with three Hardee’s restaurants in the 20-mile buffer, and the 20-mile buffer around the route
Chapter 2. Spatial data types
Figure 2.1. Open and closed linestrings created using the code in listing 2.2. The points that make up the lines are shown as well.
Figure 2.2. A non-simple linestring
Figure 2.3. Triangular polygon
Figure 2.4. Polygon with interior rings (holes)
Figure 2.5. The Seattle area modeled as a polygon with two rings (Lake Washington fills up the hole.)
Figure 2.6. A self-intersecting polygon with a text representation of POLYGON((2 0,0 0,1 1,1 -1, 2 0))'). This is an invalid polygon, but just by looking it’s impossible to see that it’s not one valid multipolygon or two valid polygons.
Figure 2.7. A single multipoint geometry (not three distinct points!)
Figure 2.8. Multilinestrings
Figure 2.9. MULTIPOLYGON (((2.25 0,1.25 1,1.25 -1, 2.25 0)),((1 -1,1 1,0 0, 1 -1)))
Figure 2.10. Geometrycollection formed from listing 2.5
Figure 2.11. A three-faced polyhedral surface generated from the code in listing 2.7
Figure 2.12. Four-faced polyhedral surface generated from the code in listing 2.8