Database Reference
In-Depth Information
POINT(3 3)
(5 rows)
But, the output seen is just a cluster of points. Normally, when we think of driving
distance, we visualize a polygon. Fortunately, we have with the
pgr_alphaShapefunction thecapacitytocreateapolygonfromasetofpoints.
pgr_alphaShape expects id , x ,and y valuesforinput,sowewillfirstchangeour
preceding query a bit:
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
)
)
SELECT id, x, y
FROM vertex_table w, DD d
WHERE w.id = d.node
;
The output is as follows:
id | x | y
----+---+---
3 | 3 | 1
5 | 0 | 2
6 | 1 | 2
7 | 2 | 2
11 | 3 | 3
(5 rows)
Now, we can wrap the preceding script in the alphashape function:
Search WWH ::




Custom Search