Chapter 1. What is a spatial database?

 

This chapter covers

  • Spatial databases in problem solving
  • Geometry data types
  • Modeling with spatial in mind
  • Why PostGIS/PostgreSQL
  • Loading and querying spatial data

In this chapter we’ll first introduce you to spatial databases. You’ll learn what they are and how they allow you to model space and perform proximity queries that are impossible with a plain relational database system. We’ll then focus on PostGIS, a spatial database extender for the PostgreSQL database management system. We’ll dive in with quick examples of loading spatial data and performing proximity analysis with PostGIS.

1.1. Thinking spatially

Popular mapping sites such as Google Maps, Virtual Earth, MapQuest, and Yahoo have empowered people in many walks of life to answer the question “Where is something?” by showing it on a gorgeously detailed, interactive map. No longer are we restricted to textual descriptions of “where” like “Turn right at the supermarket and it’s the third house on right.” Nor are we faced with the perennial problem of not being able to figure out where we currently are on a paper map.

1.2. Modeling

1.3. Introducing PostgreSQL and PostGIS

1.4. Getting started with PostGIS

1.5. Working with real data

1.6. Using spatial queries to analyze data

1.7. Summary