Skip to content
Permalink
Browse files

[processing] don't warn about different CRS's if algorithm has only one

input (fix #10964)
  • Loading branch information
alexbruy committed Aug 6, 2014
1 parent 03d6425 commit 24e89a4712f8f7936e99f177c48cb13bc216540d
Showing with 7 additions and 12 deletions.
  1. +7 −12 python/plugins/processing/core/GeoAlgorithm.py
@@ -372,22 +372,17 @@ def checkInputCRS(self):
"""It checks that all input layers use the same CRS. If so,
returns True. False otherwise.
"""
crs = None
layers = dataobjects.getAllLayers()
crsList = []
for param in self.parameters:
if isinstance(param, (ParameterRaster, ParameterVector,
ParameterMultipleInput)):
if param.value:
inputlayers = param.value.split(';')
for inputlayer in inputlayers:
for layer in layers:
if layer.source() == inputlayer:
if crs is None:
crs = layer.crs()
else:
if crs != layer.crs():
return False
return True
layers = param.value.split(';')
for item in layers:
crs = dataobjects.getObject(item).crs()
if crs not in crsList:
crsList.append(crs)
return len(crsList) == 1

def addOutput(self, output):
# TODO: check that name does not exist

0 comments on commit 24e89a4

Please sign in to comment.
You can’t perform that action at this time.