In this recipe, you will work with GPS data. This kind of data is typically saved in a
.gpx file. You will import a bunch of .
gpx files to PostGIS from RunKeeper, a popular social network for runners.
If you have an account on RunKeeper, you can export your
.gpx files and process them by following the instructions in this recipe. Otherwise, you can use the RunKeeper
.gpx files included in the
runkeeper-gpx.zip file, located in the
chp03 directory included in the code bundle available with this book.
You will first create a
bash script for importing the
.gpx files to a PostGIS table, using
ogr2ogr. After the import is completed, you will try to write a couple of SQL queries and test some very useful functions, such as