Database Reference
In-Depth Information
0 | 3 | 1
1 | 5 | 1
2 | 6 | 0
3 | 7 | 1
4 | 11 | 1
(5 rows)
Asusual,wejustgetalistfromthe pgr_drivingDistance tablethat,inthiscase,
comprisessequence,node,andcost.pPgRouting, likePostGIS, givesuslow-level
functionality; we need to reconstruct what geometries we need from that low-level
functionality.WecanusethatnodeIDtoextractthegeometriesofallofournodes,
by executing the following script:
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 ST_AsText(the_geom)
FROM vertex_table w, DD d
WHERE w.id = d.node
;
The preceding command gives the following output:
st_astext
------------
POINT(3 1)
POINT(0 2)
POINT(1 2)
POINT(2 2)
Search WWH ::




Custom Search