
440
|
Chapter 8, Building the Geospatial Web
#88 Load Your Waypoints into a Spatial Database
HACK
Server, Quantum GIS, and GRASS. For further hacking the hack, visit http://
mappinghacks.com/projects/tiger2pqsql/ to see how we got the TIGER/Line
polygons imported into PostGIS, as well.
HACK
#88
Load Your Waypoints into a Spatial Database Hack #88
The powerful PostGIS database lets you make complex spatial queries about
where you’ve been.
Spreadsheets provide power and flexibility in numerical analysis, but once
you’ve used them for a while, you run into limitations and you start looking
for a tool on the next rung of the ladder of power. Database systems have
been the desktop power user’s tool of choice for nearly 20 years.
In “How Far? How Fast? Geo-Enabling Your Spreadsheet”
[Hack #11],we
learned how to use a spreadsheet for geospatial analysis. And in “Build a
Spatially Indexed Data Store”
[Hack #87], we learned how to set up a PostGIS
spatial database and import existing spatial data sets. In this hack, we
explore the world of “what if” with a database using GPS waypoints.
In this hack, we’ll create a database schema to support waypoints and pro-
vide a small script to load waypoints into the database. We’ll finish up by
exploring some examples that illustrate the power of using a database for
geospatial analysis.
Consider Your Database Design
If you ask three database developers about a database design, ...