mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Use correct SRS when building graph
This commit is contained in:
parent
6898342c08
commit
1d6e30324f
@ -209,7 +209,7 @@ class ServiceAreaFromLayer(QgisAlgorithm):
|
|||||||
multiplier * 1000.0 / 3600.0)
|
multiplier * 1000.0 / 3600.0)
|
||||||
|
|
||||||
director.addStrategy(strategy)
|
director.addStrategy(strategy)
|
||||||
builder = QgsGraphBuilder(context.project().crs(),
|
builder = QgsGraphBuilder(network.sourceCrs(),
|
||||||
True,
|
True,
|
||||||
tolerance)
|
tolerance)
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ class ServiceAreaFromPoint(QgisAlgorithm):
|
|||||||
multiplier * 1000.0 / 3600.0)
|
multiplier * 1000.0 / 3600.0)
|
||||||
|
|
||||||
director.addStrategy(strategy)
|
director.addStrategy(strategy)
|
||||||
builder = QgsGraphBuilder(context.project().crs(),
|
builder = QgsGraphBuilder(network.sourceCrs(),
|
||||||
True,
|
True,
|
||||||
tolerance)
|
tolerance)
|
||||||
feedback.pushInfo(self.tr('Building graph...'))
|
feedback.pushInfo(self.tr('Building graph...'))
|
||||||
|
@ -207,7 +207,7 @@ class ShortestPathLayerToPoint(QgisAlgorithm):
|
|||||||
multiplier = 3600
|
multiplier = 3600
|
||||||
|
|
||||||
director.addStrategy(strategy)
|
director.addStrategy(strategy)
|
||||||
builder = QgsGraphBuilder(context.project().crs(),
|
builder = QgsGraphBuilder(network.sourceCrs(),
|
||||||
True,
|
True,
|
||||||
tolerance)
|
tolerance)
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ class ShortestPathLayerToPoint(QgisAlgorithm):
|
|||||||
|
|
||||||
nPoints = len(snappedPoints)
|
nPoints = len(snappedPoints)
|
||||||
total = 100.0 / nPoints if nPoints else 1
|
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():
|
if feedback.isCanceled():
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ from qgis.core import (QgsWkbTypes,
|
|||||||
QgsFeature,
|
QgsFeature,
|
||||||
QgsFeatureSink,
|
QgsFeatureSink,
|
||||||
QgsGeometry,
|
QgsGeometry,
|
||||||
|
QgsFeatureRequest,
|
||||||
QgsFields,
|
QgsFields,
|
||||||
QgsField,
|
QgsField,
|
||||||
QgsMessageLog,
|
QgsMessageLog,
|
||||||
@ -206,7 +207,7 @@ class ShortestPathPointToLayer(QgisAlgorithm):
|
|||||||
multiplier = 3600
|
multiplier = 3600
|
||||||
|
|
||||||
director.addStrategy(strategy)
|
director.addStrategy(strategy)
|
||||||
builder = QgsGraphBuilder(context.project().crs(),
|
builder = QgsGraphBuilder(network.sourceCrs(),
|
||||||
True,
|
True,
|
||||||
tolerance)
|
tolerance)
|
||||||
|
|
||||||
@ -237,7 +238,7 @@ class ShortestPathPointToLayer(QgisAlgorithm):
|
|||||||
|
|
||||||
nPoints = len(snappedPoints)
|
nPoints = len(snappedPoints)
|
||||||
total = 100.0 / nPoints if nPoints else 1
|
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():
|
if feedback.isCanceled():
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ class ShortestPathPointToPoint(QgisAlgorithm):
|
|||||||
multiplier = 3600
|
multiplier = 3600
|
||||||
|
|
||||||
director.addStrategy(strategy)
|
director.addStrategy(strategy)
|
||||||
builder = QgsGraphBuilder(context.project().crs(),
|
builder = QgsGraphBuilder(network.sourceCrs(),
|
||||||
True,
|
True,
|
||||||
tolerance)
|
tolerance)
|
||||||
feedback.pushInfo(self.tr('Building graph...'))
|
feedback.pushInfo(self.tr('Building graph...'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user