Database Reference
In-Depth Information
-- convert our lines into 3D lines, which will
set our third coordinate to 0 by default
threeDlines AS
(
SELECT ST_Force3DZ(the_geom) AS the_geom FROM
simple_lines
),
-- now we need our lines as individual records,
so we dump them out using ST_Dump, and then
just grab the geometry portion of the dump
splodedLine AS
(
SELECT (ST_Dump(the_geom)).geom AS the_geom
FROM threeDLines
),
-- Next step is to construct a line
representing the boundary of the
extruded "wall"
threeDline AS
(
SELECT ST_MakeLine(
ARRAY[
ST_StartPoint(the_geom),
ST_EndPoint(the_geom),
ST_Translate(ST_EndPoint(the_geom), 0, 0,
$2),
ST_Translate(ST_StartPoint(the_geom), 0, 0,
$2),
ST_StartPoint(the_geom)
]
) 

 AS the_geom FROM splodedLine
),
-- we convert this line into a polygon
threeDwall AS
(
SELECT ST_MakePolygon(the_geom) as the_geom
FROM threeDline
),
Search WWH ::




Custom Search