Skip to content

Commit 8871be0

Browse files
committed
indentation update
1 parent 7aef548 commit 8871be0

34 files changed

+357
-357
lines changed

python/plugins/fTools/tools/doSelectByLocation.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ def compute(self, inLayer, selLayer, modify, selection):
8585
geom = QgsGeometry()
8686
selectedSet = []
8787
index = ftools_utils.createIndex(inputProvider)
88-
88+
8989
def _points_op(geomA,geomB):
9090
return geomA.intersects(geomB)
91-
91+
9292
def _poly_lines_op(geomA,geomB):
9393
if geomA.disjoint(geomB):
9494
return False
@@ -102,14 +102,14 @@ def _poly_lines_op(geomA,geomB):
102102
intersects |= geomA.overlaps(geomB)
103103
if not intersects and (self.opFlags & self.WITHIN):
104104
intersects |= geomA.contains(geomB)
105-
return intersects
106-
105+
return intersects
106+
107107
def _sp_operator():
108108
if inputLayer.geometryType() == QGis.Point:
109109
return _points_op
110110
else:
111111
return _poly_lines_op
112-
112+
113113
self.opFlags = 0
114114
if self.chkTouches.checkState() == Qt.Checked:
115115
self.opFlags |= self.TOUCH

python/plugins/processing/algs/lidar/fusion/CanopyModel.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# -*- coding: utf-8 -*-
22

33
"""
44
***************************************************************************
@@ -43,7 +43,7 @@ class CanopyModel(FusionAlgorithm):
4343

4444
INPUT = 'INPUT'
4545
OUTPUT_DTM = 'OUTPUT_DTM'
46-
CELLSIZE = 'CELLSIZE'
46+
CELLSIZE = 'CELLSIZE'
4747
XYUNITS = 'XYUNITS'
4848
ZUNITS = 'ZUNITS'
4949
UNITS = ['Meter', 'Feet']
@@ -57,11 +57,11 @@ class CanopyModel(FusionAlgorithm):
5757
def defineCharacteristics(self):
5858
self.name = 'Canopy Model'
5959
self.group = 'Points'
60-
self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))
60+
self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))
6161
self.addParameter(ParameterNumber(self.CELLSIZE, 'Cellsize', 0, None, 10.0))
6262
self.addParameter(ParameterSelection(self.XYUNITS, 'XY Units', self.UNITS))
6363
self.addParameter(ParameterSelection(self.ZUNITS, 'Z Units', self.UNITS))
64-
self.addOutput(OutputFile(self.OUTPUT_DTM, 'DTM Output Surface', 'dtm'))
64+
self.addOutput(OutputFile(self.OUTPUT_DTM, 'DTM Output Surface', 'dtm'))
6565
ground = ParameterFile(self.GROUND, 'Input ground DTM layer', False, True)
6666
ground.isAdvanced = True
6767
self.addParameter(ground)
@@ -70,7 +70,7 @@ def defineCharacteristics(self):
7070
self.addParameter(median)
7171
smooth = ParameterString(self.SMOOTH, 'Smooth', '', False, True)
7272
smooth.isAdvanced = True
73-
self.addParameter(smooth)
73+
self.addParameter(smooth)
7474
slope = ParameterString(self.SLOPE, 'Slope', '', False, True)
7575
slope.isAdvanced = True
7676
self.addParameter(slope)
@@ -79,7 +79,7 @@ def defineCharacteristics(self):
7979
self.addParameter(class_var)
8080
advance_modifiers = ParameterString(self.ADVANCED_MODIFIERS, 'Additional modifiers', '', False, True)
8181
advance_modifiers.isAdvanced = True
82-
self.addParameter(advance_modifiers)
82+
self.addParameter(advance_modifiers)
8383

8484
def processAlgorithm(self, progress):
8585
commands = [os.path.join(FusionUtils.FusionPath(), 'CanopyModel.exe')]

python/plugins/processing/algs/lidar/fusion/Catalog.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# -*- coding: utf-8 -*-
22

33
"""
44
***************************************************************************
@@ -43,7 +43,7 @@ class Catalog(FusionAlgorithm):
4343
def defineCharacteristics(self):
4444
self.name = 'Catalog'
4545
self.group = 'Points'
46-
self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))
46+
self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))
4747
self.addOutput(OutputFile(self.OUTPUT, 'Output files'))
4848
density = ParameterString(self.DENSITY, 'Density - area, min, max (set blank if not used)', '', False, True)
4949
density.isAdvanced = True
@@ -58,7 +58,7 @@ def defineCharacteristics(self):
5858
advanced_modifiers.isAdvanced = True
5959
self.addParameter(advanced_modifiers)
6060

61-
61+
6262
def processAlgorithm(self, progress):
6363
commands = [os.path.join(FusionUtils.FusionPath(), 'Catalog.exe')]
6464
commands.append('/verbose')
@@ -79,6 +79,6 @@ def processAlgorithm(self, progress):
7979
commands.append(self.getParameterValue(self.INPUT))
8080
else:
8181
FusionUtils.createFileList(files)
82-
commands.append(FusionUtils.tempFileListFilepath())
83-
commands.append(self.getOutputValue(self.OUTPUT))
82+
commands.append(FusionUtils.tempFileListFilepath())
83+
commands.append(self.getOutputValue(self.OUTPUT))
8484
FusionUtils.runFusion(commands, progress)

python/plugins/processing/algs/lidar/fusion/CloudMetrics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# -*- coding: utf-8 -*-
22

33
"""
44
***************************************************************************

python/plugins/processing/algs/lidar/fusion/Csv2Grid.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# -*- coding: utf-8 -*-
22

33
"""
44
***************************************************************************

python/plugins/processing/algs/lidar/fusion/GridMetrics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
2+
33
"""
44
***************************************************************************
55
GridMetrics.py
@@ -86,7 +86,7 @@ def defineCharacteristics(self):
8686
class_var = ParameterString(self.CLASS, 'Class (set blank if not used)', '', False, True)
8787
class_var.isAdvanced = True
8888
self.addParameter(class_var)
89-
89+
9090

9191
def processAlgorithm(self, progress):
9292
commands = [os.path.join(FusionUtils.FusionPath(), 'GridMetrics.exe')]

python/plugins/processing/algs/lidar/fusion/GridSurfaceCreate.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def defineCharacteristics(self):
6161
self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))
6262
self.addParameter(ParameterNumber(self.CELLSIZE, 'Cellsize', 0, None, 10.0))
6363
self.addParameter(ParameterSelection(self.XYUNITS, 'XY Units', self.UNITS))
64-
self.addParameter(ParameterSelection(self.ZUNITS, 'Z Units', self.UNITS))
64+
self.addParameter(ParameterSelection(self.ZUNITS, 'Z Units', self.UNITS))
6565
self.addOutput(OutputFile(self.OUTPUT_DTM, 'DTM Output Surface', 'dtm'))
6666
spike = ParameterString(self.SPIKE, 'Spike (set blank if not used)', '', False, True)
6767
spike.isAdvanced = True
@@ -71,19 +71,19 @@ def defineCharacteristics(self):
7171
self.addParameter(median)
7272
smooth = ParameterString(self.SMOOTH, 'Smooth', '', False, True)
7373
smooth.isAdvanced = True
74-
self.addParameter(smooth)
74+
self.addParameter(smooth)
7575
slope = ParameterString(self.SLOPE, 'Slope', '', False, True)
7676
slope.isAdvanced = True
77-
self.addParameter(slope)
77+
self.addParameter(slope)
7878
minimum = ParameterBoolean(self.MINIMUM, 'Minimum (set blank if not used)', False)
7979
minimum.isAdvanced = True
80-
self.addParameter(minimum)
80+
self.addParameter(minimum)
8181
class_var = ParameterString(self.CLASS, 'Class(es)', 2, False, True)
8282
class_var.isAdvanced = True
8383
self.addParameter(class_var)
8484
advance_modifiers = ParameterString(self.ADVANCED_MODIFIERS, 'Additional modifiers', '', False, True)
8585
advance_modifiers.isAdvanced = True
86-
self.addParameter(advance_modifiers)
86+
self.addParameter(advance_modifiers)
8787

8888
def processAlgorithm(self, progress):
8989
commands = [os.path.join(FusionUtils.FusionPath(), 'GridSurfaceCreate.exe')]
@@ -122,5 +122,5 @@ def processAlgorithm(self, progress):
122122
commands.append(self.getParameterValue(self.INPUT))
123123
else:
124124
FusionUtils.createFileList(files)
125-
commands.append(FusionUtils.tempFileListFilepath())
125+
commands.append(FusionUtils.tempFileListFilepath())
126126
FusionUtils.runFusion(commands, progress)

python/plugins/processing/algs/lidar/fusion/PolyClipData.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def defineCharacteristics(self):
5656
## 'field' e 'value' box should appear or get activated if Shape attribute is switched ON
5757
self.addParameter(ParameterString(self.FIELD, 'Shape field index'))
5858
self.addParameter(ParameterString(self.VALUE, "Shape value"))
59-
self.addAdvancedModifiers()
60-
61-
59+
self.addAdvancedModifiers()
60+
61+
6262
def processAlgorithm(self, progress):
6363
commands = [os.path.join(FusionUtils.FusionPath(), 'PolyClipData.exe')]
6464
commands.append('/verbose')

python/plugins/processing/algs/lidar/fusion/TinSurfaceCreate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# -*- coding: utf-8 -*-
22

33
"""
44
***************************************************************************
@@ -76,5 +76,5 @@ def processAlgorithm(self, progress):
7676
if len(files) == 1:
7777
commands.append(self.getParameterValue(self.INPUT))
7878
else:
79-
commands.extend(files)
79+
commands.extend(files)
8080
FusionUtils.runFusion(commands, progress)

python/plugins/processing/algs/qgis/ftools/ExtractByLocation.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ExtractByLocation(GeoAlgorithm):
4242
OVERLAPS = 'OVERLAPS'
4343
WITHIN = 'WITHIN'
4444
OUTPUT = 'OUTPUT'
45-
45+
4646
METHODS = ['creating new selection', 'adding to current selection',
4747
'removing from current selection']
4848
opFlags = 0
@@ -73,10 +73,10 @@ def processAlgorithm(self, progress):
7373
filename = self.getParameterValue(self.INTERSECT)
7474
selectLayer = dataobjects.getObjectFromUri(filename)
7575
index = vector.spatialindex(layer)
76-
76+
7777
def _points_op(geomA,geomB):
7878
return geomA.intersects(geomB)
79-
79+
8080
def _poly_lines_op(geomA,geomB):
8181
if geomA.disjoint(geomB):
8282
return False
@@ -90,14 +90,14 @@ def _poly_lines_op(geomA,geomB):
9090
intersects |= geomA.overlaps(geomB)
9191
if not intersects and (self.opFlags & self.operators['WITHIN']):
9292
intersects |= geomA.contains(geomB)
93-
return intersects
94-
93+
return intersects
94+
9595
def _sp_operator():
9696
if layer.geometryType() == QGis.Point:
9797
return _points_op
9898
else:
9999
return _poly_lines_op
100-
100+
101101
self.opFlags = 0
102102
if self.getParameterValue(self.TOUCHES):
103103
self.opFlags |= self.operators['TOUCHES']

python/plugins/processing/algs/qgis/ftools/SelectByLocation.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ def processAlgorithm(self, progress):
8181

8282
oldSelection = set(inputLayer.selectedFeaturesIds())
8383
index = vector.spatialindex(inputLayer)
84-
84+
8585
def _points_op(geomA,geomB):
8686
return geomA.intersects(geomB)
87-
87+
8888
def _poly_lines_op(geomA,geomB):
8989
if geomA.disjoint(geomB):
9090
return False
@@ -98,14 +98,14 @@ def _poly_lines_op(geomA,geomB):
9898
intersects |= geomA.overlaps(geomB)
9999
if not intersects and (self.opFlags & self.operators['WITHIN']):
100100
intersects |= geomA.contains(geomB)
101-
return intersects
102-
101+
return intersects
102+
103103
def _sp_operator():
104104
if inputLayer.geometryType() == QGis.Point:
105105
return _points_op
106106
else:
107107
return _poly_lines_op
108-
108+
109109
self.opFlags = 0
110110
if self.getParameterValue(self.TOUCHES):
111111
self.opFlags |= self.operators['TOUCHES']

python/plugins/processing/core/Processing.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def initialize():
138138
Processing.addProvider(SagaAlgorithmProvider())
139139
Processing.addProvider(GrassAlgorithmProvider())
140140
Processing.addProvider(Grass7AlgorithmProvider())
141-
Processing.addProvider(ScriptAlgorithmProvider())
141+
Processing.addProvider(ScriptAlgorithmProvider())
142142
Processing.addProvider(TauDEMAlgorithmProvider())
143143
Processing.addProvider(ModelerAlgorithmProvider())
144144
Processing.modeler.initializeSettings()
@@ -211,7 +211,7 @@ def loadActions():
211211
for action in providerActions:
212212
actions.append(action)
213213
Processing.actions[provider.getName()] = actions
214-
214+
215215
Processing.actions[provider.getName()] = actions
216216

217217
@staticmethod
@@ -256,9 +256,9 @@ def runAlgorithm(algOrName, onFinish, *args):
256256
print 'Error: Algorithm not found\n'
257257
return
258258
alg = alg.getCopy()
259-
259+
260260
if len(args) == 1 and isinstance(args[0], dict):
261-
# Set params by name and try to run the alg even if not all parameter values are provided,
261+
# Set params by name and try to run the alg even if not all parameter values are provided,
262262
# by using the default values instead.
263263
setParams = []
264264
for (name, value) in args[0].items():

python/plugins/processing/gui/HelpEditionDialog.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ def __init__(self, alg):
5555
helpfile = alg.descriptionFile + '.help'
5656
if os.path.exists(helpfile):
5757
try:
58-
with open(helpfile) as f:
58+
with open(helpfile) as f:
5959
self.descriptions = json.load(f)
6060
except Exception, e:
61-
ProcessingLog.addToLog(ProcessingLog.LOG_WARNING, "Cannot open help file: " + helpfile)
62-
61+
ProcessingLog.addToLog(ProcessingLog.LOG_WARNING, "Cannot open help file: " + helpfile)
62+
6363
self.currentName = self.ALG_DESC
6464
if self.ALG_DESC in self.descriptions:
6565
self.text.setText(self.descriptions[self.ALG_DESC])
@@ -80,7 +80,7 @@ def accept(self):
8080
if self.alg.descriptionFile is not None:
8181
try:
8282
with open(self.alg.descriptionFile + '.help', 'w') as f:
83-
json.dump(self.descriptions, f)
83+
json.dump(self.descriptions, f)
8484
except Exception, e:
8585
QMessageBox.warning(self, 'Error saving help file',
8686
'Help file could not be saved.\n'

python/plugins/processing/modeler/AddModelFromFileAction.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def execute(self):
4747
'*.model')
4848
if filename:
4949
try:
50-
ModelerAlgorithm.fromJsonFile(filename)
50+
ModelerAlgorithm.fromJsonFile(filename)
5151
except WrongModelException:
5252
QtGui.QMessageBox.warning(self.toolbox, "Error reading model", "The selected file does not contain a valid model")
5353
return

python/plugins/processing/modeler/CalculatorModelerAlgorithm.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
NUMBER = 'NUMBER'
4141
RESULT = 'RESULT'
4242
AVAILABLE_VARIABLES = 10
43-
43+
4444
class CalculatorModelerAlgorithm(GeoAlgorithm):
4545

4646
def defineCharacteristics(self):
@@ -68,10 +68,10 @@ def processAlgorithm(self, progress):
6868

6969
def getCustomModelerParametersDialog(self, modelAlg, algIndex=None):
7070
return CalculatorModelerParametersDialog(self, modelAlg, algIndex)
71-
71+
7272

7373
class CalculatorModelerParametersDialog(ModelerParametersDialog):
74-
74+
7575
def setupUi(self):
7676
self.valueItems = {}
7777
self.dependentItems = {}
@@ -112,21 +112,21 @@ def setupUi(self):
112112
def createAlgorithm(self):
113113
alg = Algorithm('modelertools:calculator')
114114
alg.setName(self.model)
115-
alg.description = "Calculator"
115+
alg.description = "Calculator"
116116

117117
formula = self.formulaText.text()
118118
alg.params[FORMULA] = formula
119-
119+
120120
for i in xrange(AVAILABLE_VARIABLES):
121121
paramname = NUMBER + str(i)
122122
alg.params[paramname] = None
123-
123+
124124
numbers = self.getAvailableValuesOfType(ParameterNumber, OutputNumber)
125125
used = []
126126
for i in range(len(numbers)):
127127
if str(chr(i + 97)) in formula:
128-
used.append(numbers[i])
129-
128+
used.append(numbers[i])
129+
130130
for i, variable in enumerate(used):
131131
paramname = NUMBER + str(i)
132132
alg.params[paramname] = variable
@@ -135,4 +135,4 @@ def createAlgorithm(self):
135135
return alg
136136

137137

138-
138+

0 commit comments

Comments
 (0)