Bug report #11952

Network analysis graph empty

Added by Jos Ferraro almost 10 years ago. Updated almost 8 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Analysis library
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

Description

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.

empty.rar - non working example (1.07 KB) Jos Ferraro, 2015-01-05 09:27 AM

full.rar - working example (914 Bytes) Jos Ferraro, 2015-01-05 09:27 AM

Associated revisions

Revision 904dc216
Added by Alexander Bruy over 8 years ago

support 25D layers in network analysis library (fix #11952)

Revision 8b57da3a
Added by Alexander Bruy over 8 years ago

support 25D layers in network analysis library (fix #11952)

(cherry picked from commit 904dc216251d183305ba1c5dc6c846be10a879db)

History

#1 Updated by Jürgen Fischer over 9 years ago

  • Category set to 113

#2 Updated by Alexander Bruy over 8 years ago

  • Status changed from Open to Closed

#3 Updated by Giovanni Manghi almost 8 years ago

  • Category changed from 113 to Analysis library

Also available in: Atom PDF