Here is one perhaps more relevant to your use case - Using the dummy raster table from here - http://postgis.net/docs/RT_reference.html
SELECT ST_Extrude(gv.geom, 0, 0, gv.val) FROM dummy_rast AS p CROSS JOIN LATERAL ST_DumpAsPolygons(p.rast) AS gv; From: Regina Obe [mailto:l...@pcorp.us] Sent: Wednesday, December 9, 2020 6:01 PM To: 'PostGIS Users Discussion' <postgis-users@lists.osgeo.org> Subject: RE: [postgis-users] St_Extrude Yes. Here is an example that uses two contrived tables - I'm joining by id here, but you can just as well join by ST_Intersects like if your elev is from a raster and z is the pixel value when you do a ST_DumpAsPolygons WITH elev AS ( SELECT id, z FROM generate_series(1,10,4) WITH ORDINALITY AS f(z,id) ) , poly AS ( SELECT id, geom FROM (VALUES ( 1, ST_Buffer( ST_Point(1,2), 10) ) , ( 2, ST_GeomFromText('POLYGON((0 0 8, 0 1 8, 1 1 8, 1 0 8, 0 0 8))') ) ) AS f(id, geom) ) SELECT poly.id, ST_Extrude(poly.geom,0,0, elev.z) FROM elev INNER JOIN poly ON (elev.id = poly.id); Hope that helps, Regina From: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of Amy O'Keefe Sent: Wednesday, December 9, 2020 6:00 AM To: PostGIS Users Discussion <postgis-users@lists.osgeo.org <mailto:postgis-users@lists.osgeo.org> > Subject: [postgis-users] St_Extrude Hello, Does anyone know if it is possible to extrude shapes to the assigned z value? So far I have only been able to use ST_Extrude to extrude the shapes to one constant height This email and any attachments are confidential and intended solely for the use of the addressee and may contain information which is covered by legal, professional or other privilege. If you have received this email in error please notify the system manager at <mailto:postmas...@ulster.ac.uk> postmas...@ulster.ac.uk and delete this email immediately. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Ulster University. The University's computer systems may be monitored and communications carried out on them may be recorded to secure the effective operation of the system and for other lawful purposes. Ulster University does not guarantee that this email or any attachments are free from viruses or 100% secure. Unless expressly stated in the body of a separate attachment, the text of email is not intended to form a binding contract. Correspondence to and from the University may be subject to requests for disclosure by 3rd parties under relevant legislation. The Ulster University was founded by Royal Charter in 1984 and is registered with company number RC000726 and VAT registered number GB672390524.The primary contact address for Ulster University in Northern Ireland is Cromore Road, Coleraine, Co. Londonderry BT52 1SA
_______________________________________________ postgis-users mailing list postgis-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/postgis-users