O'Reilly logo

Python Geospatial Analysis Essentials by Erik Westra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing the GPS Heatmap system

Now that we have the necessary data, we're ready to start implementing our GPS Heatmap system. Create a directory named gps-heatmap to hold the suite of programs and their associated data files, and then place the two data directories you created earlier (gps-data and roads) into this directory.

We're now ready to start coding. Let's start by implementing the init_db.py program to initialize our PostGIS database.

Initializing the database

You should already have installed Postgres when you worked through Chapter 3, Spatial Databases. We're going to use Postgres to create and initialize a database to hold all our processed road data. The first step is to create the database itself, which you can do by typing the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required