CG_GenerateGableRoof — Generate a gable roof from a footprint polygon.
geometry CG_GenerateGableRoof(geometry geom, float8 height, float8 slope_angle);
Generate a gable roof as a 3D PolyhedralSurface Z from a 2D footprint polygon. Two opposite sides are vertical gable ends; the other two sides slope to a horizontal ridge. height sets the ridge height above the ground (default 3.0) and slope_angle controls the pitch in degrees (default 30.0). The SRID of the input geometry is preserved.
Availability: 3.7.0 - requires SFCGAL >= 2.3.0.
Diese Methode benötigt ein SFCGAL-Backend.
Diese Funktion unterstützt polyedrische Flächen.
SELECT ST_CoordDim(
CG_GenerateGableRoof(
'POLYGON((0 0,5 0,5 4,0 4,0 0))',
2.0, 30.0));
-- 3
|
![]() |