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

Manipulating spatial data


You are not limited to just using static data in your spatial analysis. You can also create new geometries and manipulate existing geometries directly within a PostGIS database. While it's easy to create a brand new geometry using functions such as the ST_GeogFromText() function we used earlier, you can also use the PostGIS geometry editing and geometry processing functions to create new geography values derived from old ones.

Note

There are some limitations on the functions available when you use the PostGIS GEOGRAPHY type. PostGIS originally only supported the GEOMETRY data type, which was designed to only work with spatial data projected onto a flat Cartesian plane. When using the GEOGRAPHY field, check the PostGIS manual to see which functions are supported.

To get an idea of how we can calculate new spatial values based on our existing data, let's write a program to buffer our outlines, and store them into a new GEOGRAPHY column in our database table.

We saw the...