O'Reilly logo

PostGIS Cookbook by Bborie Park, Stephen Vincent Mather, Thomas J. Kraft, Paolo Corti

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

Constructing and serving buildings 2.5 D

In the Generating detailed building footprints from LiDAR recipe in Chapter 4, Working with Vector Data – Advanced Recipes, we explored the automatic generation of building footprints using LiDAR data. What we were attempting to do was create 2D data from 3D data. In this recipe, we attempt the opposite, in a sense. We start with 2D polygons of building footprints and feed them into a function that extrudes them as 3D polygons.

Getting ready

For use in this project, we will extrude a building footprint of our own making. Let us quickly create a table with a single building footprint, for testing purposes, as follows:

CREATE TABLE chp07.simple_building AS
 SELECT 1 AS gid, ST_MakePolygon(ST_GeomFromText('LINESTRING(0 ...

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