Database Reference
In-Depth Information
gid
FROM astext
),
startingbracket AS (
SELECT replace(pstring, 'POINT(', '[') AS
pstring, gid
FROM astextcomma
),
endingbracket AS (
SELECT replace(pstring, ')', ']') AS pstring,
gid
FROM startingbracket
)
SELECT ROW(pstring, gid)::vor FROM
endingbracket;
$$ LANGUAGE SQL;
NowwecanusethisfunctiontohelpprepareourdataforourfastVoronoifunction
using the following query:
WITH stringprep AS (
SELECT chp04.voronoi_prep(the_geom, gid) FROM
chp04.voronoi_test_points
),
aggstring AS (
SELECT '[' ||
STRING_AGG((voronoi_prep).geomstring, ',' ORDER
BY (voronoi_prep).gid) || ']' AS inputtext
FROM stringprep
)
SELECT chp04.voronoi_fast(inputtext) FROM
aggstring;
If you check the output, it looks the sameas it did before:
Search WWH ::




Custom Search