Database Reference
In-Depth Information
WITH alphashape AS (
SELECT pgr_alphaShape('
WITH DD AS (
SELECT seq, id1 AS node, cost
FROM pgr_drivingDistance(
''SELECT id, source, target, cost FROM
edge_table'',
6, 1.5, false, false
)
),
dd_points AS(
SELECT id, x, y
FROM vertex_table w, DD d
WHERE w.id = d.node
)
SELECT * FROM dd_points
')
),
First, we will get our cluster of points. As done earlier, we will explicitly convert the
text to geometric points:
alphapoints AS (
SELECT ST_MakePoint((pgr_alphashape).x,
(pgr_alphashape).y) FROM alphashape
),
Now that we have points, we can create a line by connecting them:
alphaline AS (
SELECT ST_Makeline(ST_MakePoint) FROM
alphapoints
)
SELECT ST_MakePolygon(ST_AddPoint(ST_Makeline,
ST_StartPoint(ST_Makeline))) FROM alphaline;
Search WWH ::




Custom Search