Using postgis to generate building shades
Simplest way to do this is with an
ST_Extrude(geom,x-direction,y-direction,0)
You will have to calculate the extrude factor yourself of course and it assumes your whole polygon is the same height.(in your example, extrude would be like:
ST_Extrude(geom, 0, 3.0*height, 0)
)
Here is the manual on ST_Extrude. Keep in mind that you need postgis with SFCGAL for this, check the installation docs on how to get this if you don't already have it.