1

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.

Snapshot from PgAdmin

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:

Error Message:

Does someone know what is going wrong here?

1 Answer 1

5

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;
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.