Book Image

Python Geospatial Analysis Essentials

By : Erik Westra
Book Image

Python Geospatial Analysis Essentials

By: Erik Westra

Overview of this book

Table of Contents (13 chapters)
Python Geospatial Analysis Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Installing a spatial database


In this book, we are going to use one of the most popular and powerful geospatial databases: PostGIS. PostGIS is an extension to the freely available PostgreSQL relational database. To use it in our Python programs, we need to install three separate pieces of software:

  • The PostgreSQL database server itself

  • The PostGIS extension to PostgreSQL

  • The psycopg2 database adapter for Python

    Note

    PostgreSQL is often referred to simply as Postgres. We will use this more colloquial name regularly throughout this book.

Let's work through the process of installing each of these pieces of software in turn.

Installing PostgreSQL

PostgreSQL (http://postgresql.org) is one of the most powerful open source relational databases available. While it has a reputation for being difficult to set up and use, it's not too tricky, and with prebuilt installers available for every major operating system the setup process is now quite straightforward.

Let's go ahead and get PostgreSQL installed on...