Skip to content
Permalink
Browse files
[processing] Fix Hub Distance alg does not correctly use project elli…
…psoid setting
  • Loading branch information
nyalldawson committed May 25, 2017
1 parent b0268ef commit 7e089a1c01c3996a43a90c79caa6fb549a737bdd
Showing with 4 additions and 1 deletion.
  1. +4 −1 python/plugins/processing/algs/qgis/HubDistance.py
@@ -26,7 +26,7 @@
__revision__ = '$Format:%H$'

from qgis.PyQt.QtCore import QVariant
from qgis.core import QGis, QgsField, QgsGeometry, QgsDistanceArea, QgsFeature, QgsFeatureRequest
from qgis.core import QGis, QgsField, QgsGeometry, QgsDistanceArea, QgsFeature, QgsFeatureRequest, QgsProject
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import ParameterVector
@@ -111,6 +111,9 @@ def processAlgorithm(self, progress):
distance = QgsDistanceArea()
distance.setSourceCrs(layerPoints.crs().srsid())
distance.setEllipsoidalMode(True)
project_ellipsoid = QgsProject.instance().readEntry('Measure', '/Ellipsoid',
'NONE')[0]
distance.setEllipsoid(project_ellipsoid)

# Scan source points, find nearest hub, and write to output file
features = vector.features(layerPoints)

0 comments on commit 7e089a1

Please sign in to comment.