mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Allow processing tests to specify ellipsoid/project CRS
This commit is contained in:
parent
1223a1cd35
commit
9fe26af8fa
@ -43,6 +43,7 @@ from copy import deepcopy
|
||||
|
||||
from qgis.core import (QgsVectorLayer,
|
||||
QgsRasterLayer,
|
||||
QgsCoordinateReferenceSystem,
|
||||
QgsFeatureRequest,
|
||||
QgsMapLayer,
|
||||
QgsProject,
|
||||
@ -86,6 +87,16 @@ class AlgorithmsTest(object):
|
||||
self.vector_layer_params = {}
|
||||
QgsProject.instance().removeAllMapLayers()
|
||||
|
||||
if 'project_crs' in defs:
|
||||
QgsProject.instance().setCrs(QgsCoordinateReferenceSystem(defs['project_crs']))
|
||||
else:
|
||||
QgsProject.instance().setCrs(QgsCoordinateReferenceSystem())
|
||||
|
||||
if 'ellipsoid' in defs:
|
||||
QgsProject.instance().setEllipsoid(defs['ellipsoid'])
|
||||
else:
|
||||
QgsProject.instance().setEllipsoid('')
|
||||
|
||||
params = self.load_params(defs['params'])
|
||||
|
||||
print('Running alg: "{}"'.format(defs['algorithm']))
|
||||
|
Loading…
x
Reference in New Issue
Block a user