Chapter 6. Spatial Databases

In this chapter, we will look at how you can use a PostGIS database to store and work with spatial data. In particular, we will cover:

  • The concept of a spatially enabled database
  • Spatial indexes and how they work
  • How PostGIS acts as an extension to the PostgreSQL relational database
  • How to install PostgreSQL, PostGIS, and the psycopg2 Python database adapter onto your computer
  • How to set up and configure a spatial database using PostGIS
  • How to use the psycopg2 database adapter to access a spatial database from your Python code
  • How to create, import, and query against spatial data using Python
  • Recommended best practices for storing spatial data in a database

This chapter is intended to be an introduction to using databases in ...

Get Python Geospatial Development - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.