mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -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,
|
from qgis.core import (QgsVectorLayer,
|
||||||
QgsRasterLayer,
|
QgsRasterLayer,
|
||||||
|
QgsCoordinateReferenceSystem,
|
||||||
QgsFeatureRequest,
|
QgsFeatureRequest,
|
||||||
QgsMapLayer,
|
QgsMapLayer,
|
||||||
QgsProject,
|
QgsProject,
|
||||||
@ -86,6 +87,16 @@ class AlgorithmsTest(object):
|
|||||||
self.vector_layer_params = {}
|
self.vector_layer_params = {}
|
||||||
QgsProject.instance().removeAllMapLayers()
|
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'])
|
params = self.load_params(defs['params'])
|
||||||
|
|
||||||
print('Running alg: "{}"'.format(defs['algorithm']))
|
print('Running alg: "{}"'.format(defs['algorithm']))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user