首页 > 代码库 > PostGIS pgrouting
PostGIS pgrouting
alter table roadline add column source integer;
alter table roadline add column target integer;
select pgr_createTopology(‘roadline‘, 0.0001, ‘geom‘, ‘gid‘);
SELECT seq, id1 AS node, id2 AS edge, cost, geom
FROM pgr_dijkstra(
‘SELECT gid as id, source, target, st_length(geom) as cost FROM roadline‘,
1, 2, false, false
) as di
JOIN roadline pt
ON di.id2 = pt.gid ;
PostGIS pgrouting
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。