mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
[processing] don't warn about different CRS's if algorithm has only one
input (fix #10964)
This commit is contained in:
parent
03d6425038
commit
24e89a4712
@ -372,22 +372,17 @@ class GeoAlgorithm:
|
|||||||
"""It checks that all input layers use the same CRS. If so,
|
"""It checks that all input layers use the same CRS. If so,
|
||||||
returns True. False otherwise.
|
returns True. False otherwise.
|
||||||
"""
|
"""
|
||||||
crs = None
|
crsList = []
|
||||||
layers = dataobjects.getAllLayers()
|
|
||||||
for param in self.parameters:
|
for param in self.parameters:
|
||||||
if isinstance(param, (ParameterRaster, ParameterVector,
|
if isinstance(param, (ParameterRaster, ParameterVector,
|
||||||
ParameterMultipleInput)):
|
ParameterMultipleInput)):
|
||||||
if param.value:
|
if param.value:
|
||||||
inputlayers = param.value.split(';')
|
layers = param.value.split(';')
|
||||||
for inputlayer in inputlayers:
|
for item in layers:
|
||||||
for layer in layers:
|
crs = dataobjects.getObject(item).crs()
|
||||||
if layer.source() == inputlayer:
|
if crs not in crsList:
|
||||||
if crs is None:
|
crsList.append(crs)
|
||||||
crs = layer.crs()
|
return len(crsList) == 1
|
||||||
else:
|
|
||||||
if crs != layer.crs():
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def addOutput(self, output):
|
def addOutput(self, output):
|
||||||
# TODO: check that name does not exist
|
# TODO: check that name does not exist
|
||||||
|
Loading…
x
Reference in New Issue
Block a user