Book Image

PostGIS Cookbook

Book Image

PostGIS Cookbook

Overview of this book

Table of Contents (18 chapters)
PostGIS Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using ST_Extrude to extrude building footprints


PostGIS 2.1 brought a lot of really cool additional functionality to PostGIS. Operation on PostGIS raster types are among the more important improvements that come with PostGIS 2.1. A quieter and equally potent game changer was the addition of the SFCGAL library as an optional extension to PostGIS. According to the website http://sfcgal.org/, SFCGAL is a C++ wrapper library around CGAL with the aim of supporting ISO 19107:2013 and OGC Simple Features Access 1.2 for 3D operations.

From a practical standpoint, what does this mean? It means that PostGIS is moving toward a fully functional 3D environment, with representation of the geometries themselves and the operations on those 3D geometries. More information is available at http://postgis.net/docs/reference.html#reference_sfcgal.

This and several other recipes will assume that you have a version of PostGIS installed with SFCGAL compiled and enabled. To do so enables the following functions:

  • ST_Extrude...