Skip to content
Permalink
Browse files

Use correct SRS when building graph

  • Loading branch information
nyalldawson committed Sep 24, 2017
1 parent 6898342 commit 1d6e30324f6e284c9bab7b9aa43cb2663ee3b5cd
@@ -209,7 +209,7 @@ def processAlgorithm(self, parameters, context, feedback):
multiplier * 1000.0 / 3600.0)

director.addStrategy(strategy)
builder = QgsGraphBuilder(context.project().crs(),
builder = QgsGraphBuilder(network.sourceCrs(),
True,
tolerance)

@@ -200,7 +200,7 @@ def processAlgorithm(self, parameters, context, feedback):
multiplier * 1000.0 / 3600.0)

director.addStrategy(strategy)
builder = QgsGraphBuilder(context.project().crs(),
builder = QgsGraphBuilder(network.sourceCrs(),
True,
tolerance)
feedback.pushInfo(self.tr('Building graph...'))
@@ -207,7 +207,7 @@ def processAlgorithm(self, parameters, context, feedback):
multiplier = 3600

director.addStrategy(strategy)
builder = QgsGraphBuilder(context.project().crs(),
builder = QgsGraphBuilder(network.sourceCrs(),
True,
tolerance)

@@ -237,7 +237,7 @@ def processAlgorithm(self, parameters, context, feedback):

nPoints = len(snappedPoints)
total = 100.0 / nPoints if nPoints else 1
for i in range(1, count + 1):
for i in range(1, nPoints + 1):
if feedback.isCanceled():
break

@@ -36,6 +36,7 @@
QgsFeature,
QgsFeatureSink,
QgsGeometry,
QgsFeatureRequest,
QgsFields,
QgsField,
QgsMessageLog,
@@ -206,7 +207,7 @@ def processAlgorithm(self, parameters, context, feedback):
multiplier = 3600

director.addStrategy(strategy)
builder = QgsGraphBuilder(context.project().crs(),
builder = QgsGraphBuilder(network.sourceCrs(),
True,
tolerance)

@@ -237,7 +238,7 @@ def processAlgorithm(self, parameters, context, feedback):

nPoints = len(snappedPoints)
total = 100.0 / nPoints if nPoints else 1
for i in range(1, count + 1):
for i in range(1, nPoints + 1):
if feedback.isCanceled():
break

@@ -206,7 +206,7 @@ def processAlgorithm(self, parameters, context, feedback):
multiplier = 3600

director.addStrategy(strategy)
builder = QgsGraphBuilder(context.project().crs(),
builder = QgsGraphBuilder(network.sourceCrs(),
True,
tolerance)
feedback.pushInfo(self.tr('Building graph...'))

0 comments on commit 1d6e303

Please sign in to comment.
You can’t perform that action at this time.