Skip to content

Commit 8884c37

Browse files
committed
[processing] add nocrswarning option to scripts
fixes #12784
1 parent f8f2528 commit 8884c37

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

python/plugins/processing/script/ScriptAlgorithm.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def __init__(self, descriptionFile, script=None):
7171
GeoAlgorithm.__init__(self)
7272
self.script = script
7373
self.allowEdit = True
74+
self.noCRSWarning = False
7475
self.descriptionFile = descriptionFile
7576
if script is not None:
7677
self.defineCharacteristicsFromScript()
@@ -120,6 +121,12 @@ def defineCharacteristicsFromScript(self):
120121
except:
121122
pass
122123

124+
def checkInputCRS(self):
125+
if self.noCRSWarning:
126+
return True
127+
else:
128+
return GeoAlgorithm.checkInputCRS(self)
129+
123130
def createDescriptiveName(self, s):
124131
return s.replace('_', ' ')
125132

@@ -137,6 +144,9 @@ def processParameterLine(self, line):
137144
if line == "nomodeler":
138145
self.showInModeler = False
139146
return
147+
if line == "nocrswarning":
148+
self.noCRSWarning = True
149+
return
140150
tokens = line.split('=', 1)
141151
desc = self.createDescriptiveName(tokens[0])
142152
if tokens[1].lower().strip() == 'group':

0 commit comments

Comments
 (0)