From 0a769f8ca077f9fe040b9af83ef056f535e1dbb9 Mon Sep 17 00:00:00 2001 From: mapas de vicky Date: Fri, 17 Jul 2015 15:59:29 -0500 Subject: [PATCH] Added the manually the suggested code of #282 --- src/common/sql/pgrouting_node_network.sql | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/common/sql/pgrouting_node_network.sql b/src/common/sql/pgrouting_node_network.sql index c04882236f1..9b324627f58 100644 --- a/src/common/sql/pgrouting_node_network.sql +++ b/src/common/sql/pgrouting_node_network.sql @@ -183,11 +183,15 @@ BEGIN -- drop table if exists inter_loc; --HAD TO CHANGE THIS QUERY - p_ret= 'create temp table inter_loc on commit drop as ( select * from ( - (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom) - union - (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo - where locus<>0 and locus<>1)'; + p_ret= 'create temp table inter_loc on commit drop as ( + select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from ( + select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo + where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)'; +-- p_ret= 'create temp table inter_loc on commit drop as ( select * from ( +-- (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom) +-- union +-- (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo +-- where locus<>0 and locus<>1)'; raise debug '%',p_ret; EXECUTE p_ret;