Database Reference
In-Depth Information
(
SELECT the_geom FROM middleline
UNION ALL
SELECT the_geom FROM topline
UNION ALL
SELECT the_geom FROM bottomline
UNION ALL
SELECT the_geom FROM oneline
UNION ALL
SELECT the_geom FROM twoline
UNION ALL
SELECT the_geom FROM threeline
UNION ALL
SELECT the_geom FROM fourline
UNION ALL
SELECT the_geom FROM fiveline
UNION ALL
SELECT the_geom FROM sixline
) AS alllines
)
Butwehavenotcreatedpolygonsyet,justlines.Thefinalstep,usingour polygon-
ize_to_multi functionfinishes the work for us:
SELECT
chp04.polygonize_to_multi(ST_Rotate(the_geom,
$2, $1)) AS the_geom FROM combined
;
The combined query is as follows:
CREATE OR REPLACE FUNCTION chp04.create_grid
(geometry, float) RETURNS geometry AS $$
WITH middleline AS (
SELECT ST_MakeLine(ST_Translate($1,
Search WWH ::




Custom Search