Bug report #11952
Network analysis graph empty
|Affected QGIS version:||2.6.0||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||20160|
When building a graph using the network analysis library, I get (depending on the shapefile) a empty graph (no nodes or edges), even when there are features on the layer.
I attach two files, that should be identical as seen from the network analysis library, but they produce widely different results. For example, run:
layer = iface.activeLayer() director = QgsLineVectorLayerDirector( layer, -1, '', '', '', 3 ) properter = QgsDistanceArcProperter() director.addProperter( properter ) builder = QgsGraphBuilder( layer.crs() ) tiedPoints = director.makeGraph( builder,  ) graph = builder.graph() vn = graph.vertexCount() print(u"the graph has"+str(vn)+u" points")
on both layers(of the attached files) and one shall see that on e graph has 5 points(as expected) and the other has 0.