Qgis network analysis why find vertex return always -1

المشرف العام

Administrator
طاقم الإدارة
I'm trying to compute the shortest path between points using the QGIS networkanalysis library. But the graph.findVertex always return -1.

Basically what I'm trying to do is :1/ Given a set of points, create a grid. The size of the grid is define by the poins bounding box2/ transform all the cells' grid to point (centroid)3/ For each cell's centroid compute the shortest path with the set of points

My script works fine with no error, but the graph.findVertex() function always return -1. It's like my points are not tied to the graph...

My code is available on pastebin :http://pastebin.com/u6n4tSkz

Do you know what I'm doing wrong ?

Thanks for your help

Arnaud



أكثر...
 
أعلى