[pgrouting-users] Cleaning multilinestring vector network for routing via kDijkstra

AUS - Eyad b00038807 at aus.edu
Mon Dec 15 09:24:25 PST 2014

Hi All,


As I'm still struggling to make my network routable, I tried using
pgr_nodeNetwork (instead of using v.clean), as follows:


Select pgr_nodeNetwork ('schema.table', 0.0001, 'id', 'geom')


But I got the following Error:


line_locate_point: 1st arg isnt a line

CONTEXT:  SQL statement "create temp table inter_loc on commit drop as (
select * from (

        (select l1id, l2id, st_linelocatepoint(line,source) as locus from


        (select l1id, l2id, st_linelocatepoint(line,target) as locus from
intergeom)) as foo

        where locus<>0 and locus<>1)"

PL/pgSQL function pgr_nodenetwork(text,double precision,text,text,text) line
184 at EXECUTE statement



I removed line 184 from my table but still getting same Error!


Afterward, I tried calculating the costs using pgr_kdijkstraCost, but
unfortunately most of the results are "-1" which means that there is no


Important note: my network is somehow accurate (done on CAD), but I think
this is a normal cleaning that every expert of you may take it for granted


Please assist in resolving this issue (even by suggesting new tool/function)
because my time is becoming tight and this is my first real/full application
using pgRouting







From: AUS - Eyad [mailto:b00038807 at aus.edu] 
Sent: Monday, December 15, 2014 12:44 AM
To: 'pgRouting users mailing list'
Subject: Cleaning multilinestring vector network for routing via kDijkstra


Hi All,


I'm facing a serious issue preparing my multilinestring vector network for


I imported my vector network from CAD file. Obviously, there are some areas
where lines are intercrossing still not routable_through; although, they are
connected to each others!


I used V.Clean (advance) to clean the network before importing to the
database. I tried (break, snap, bpol, etc) alternatively but still not sure
which one is the proper tool. Also I'm finding it hard to set the parameters
because my vector network is obviously imported in millimeters while the
network is spread on a length reaching 700m from start to destination from
some ends.


I'm testing the results via shortest_path plugin before I import to
DataBase. In few successful cases using shortest_path, afterwards the
network gets to lose a lot of elements while importing to DB (i.e. 600
features only written from 700).


If there are other ways to make the network clean and routable, please


I'm using QGIS 2.4.0 and pgRouting pg93-binaries-2.4.0









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20141215/63d2bb3f/attachment.html>

More information about the Pgrouting-users mailing list