SELECT
bldg_id,
ST_Extrude(geom, 0, 0, height_ft * 0.3048) AS geom3d
FROM nyc_building_footprints;
ST_Extrude(geom, dx, dy, dz) lifts a 2D polygon along the (dx, dy, dz) vector.
- For buildings you only care about
dz — height in the unit of the SRS.
- Output is a
PolyhedralSurfaceZ (closed 3D surface) — what QGIS 3D and most 3D viewers expect.