ST_Extrude screen shot: PostGIS with SFCGAL

I have been working a bit to get horao working to visualize PostGIS 3D data.  In the mean time, I have a little work around for viewing 3D extrudes a 3Dish way (i.e. isometric)

The nightly build of QGIS now allows you to visualize polyhedral surfaces, the output type of ST_Extrude.  So, I cheated.  ST_Extrude takes 4 parameters:

geometry ST_Extrude(geometry geom, float x, float y, float z);

an input geometry, and extrusion along the x, y, and z axes.  So, instead of a normal Z extrude where the x and y axes of the extrude are zeroed out, e.g.:

CREATE TABLE buildings_extruded AS
SELECT gid, ST_Extrude(the_geom, 0,0, 40) as the_geom
	FROM building_footprints;

We’ll extrude a bit along the x and y axes:

CREATE TABLE buildings_extruded AS
SELECT gid, ST_Extrude(the_geom, 20,20, 40) as the_geom
	FROM building_footprints;

And then view in QGIS with the original geometry on top:

ST_Extrude output as quasi-isometric view
ST_Extrude output as quasi-isometric

One thought on “ST_Extrude screen shot: PostGIS with SFCGAL

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.