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?

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Oct 9, 2015 at 13:34

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;
answered Oct 9, 2015 at 13:58
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.