I'm trying to use the function ST_Extrude() in Postgres 9.2. I enabled the PostGIS 2.2.0 extension and the PostGIS_SFCGAL extension (which carries the ST_Extrude function).
I can see the function in my list of functions (see snapshot), but I cannot use it.
When I try following SQL code:
CREATE TABLE house AS
SELECT id, ST_Extrude(geog, 0, 0, 5) as geom
FROM houses
WHERE id = 1500;
I get an error that the function ST_Extrude does not exist:
Does someone know what is going wrong here?
1 Answer 1
ST_Extrude is only supported for geometry type. From the error looks like you are trying to use it for geography. You'll probably also want to maybe change your projection to a meter based one to make sense when you extrude.
Try something like :
CREATE TABLE house AS
SELECT id,
ST_Extrude(ST_Transform(geog::geometry,900913), 0, 0, 5) as geom
FROM houses
WHERE id = 1500;