Chapter 1. What is a spatial database?
Figure 1.1. Pushpin madness!
Figure 1.2. The basic geometries: a point, a linestring, and a polygon
Figure 1.3. The Utah salt flats—we can model them with linestrings, points, and polygons.
Figure 1.4. Linestrings and polygons created in the following code snippets
Figure 1.5. The Plugins menu of pgAdmin III shows the PostGIS Shapefile and DBF loader.
Figure 1.6. Loading into the geometry data type
Figure 1.7. Loading data into the geography data type. We pretend our data is 4326 instead of 4269 because they’re similar. We go ahead and index and check the load into geography.
Figure 1.8. U.S. Route 1 in Maryland, with three Hardee’s restaurants in the 10-mile buffer, and the 10-mile buffer around the route
Chapter 2. Geometry types
Figure 2.1. Three points created using the code in listing 2.1
Figure 2.2. 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.3. A non-simple linestring tested for simplicity
Figure 2.4. Triangle-shaped polygon
Figure 2.5. Polygon with interior rings (holes)
Figure 2.6. We model the Seattle area as a polygon with two rings. Lake Washington fills up the hole. We’re also overlooking the existence of Mercer Island in the lake, which would make this a multipolygon.