Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Jan 17, 2015
1 parent 07462f5 commit d8a224d
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 37 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/aspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterBoolean(
self.COMPUTE_EDGES, self.tr('Compute edges'), False))
self.addParameter(ParameterBoolean(self.ZEVENBERGEN,
self.tr"Use Zevenbergen&Thorne formula (instead of the Horn's one)"),
self.tr("Use Zevenbergen&Thorne formula (instead of the Horn's one)"),
False))
self.addParameter(ParameterBoolean(self.TRIG_ANGLE,
self.tr('Return trigonometric angle (instead of azimuth)'), False))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterBoolean(self.OVERWRITE,
self.tr('Overwrite existing table'), True))
self.addParameter(ParameterBoolean(self.APPEND,
self.tr('Append to existing table', False))
self.tr('Append to existing table'), False))
self.addParameter(ParameterBoolean(self.ADDFIELDS,
self.tr('Append and add new fields to existing table'), False))
self.addParameter(ParameterBoolean(self.LAUNDER,
Expand Down
25 changes: 12 additions & 13 deletions python/plugins/processing/algs/gdal/rasterize.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,21 @@ def processAlgorithm(self, progress):
if not writeOver:
arguments.append('-ot')
arguments.append(self.TYPE[self.getParameterValue(self.RTYPE)])
dimType = self.getParameterValue(self.DIMENSIONS)
if dimType == 0:
# size in pixels
arguments.append('-ts')
arguments.append(str(self.getParameterValue(self.WIDTH)))
arguments.append(str(self.getParameterValue(self.HEIGHT)))
else:
# resolution in map units per pixel
arguments.append('-tr')
arguments.append(str(self.getParameterValue(self.WIDTH)))
arguments.append(str(self.getParameterValue(self.HEIGHT)))
dimType = self.getParameterValue(self.DIMENSIONS)
if dimType == 0:
# size in pixels
arguments.append('-ts')
arguments.append(str(self.getParameterValue(self.WIDTH)))
arguments.append(str(self.getParameterValue(self.HEIGHT)))
else:
# resolution in map units per pixel
arguments.append('-tr')
arguments.append(str(self.getParameterValue(self.WIDTH)))
arguments.append(str(self.getParameterValue(self.HEIGHT)))

arguments.append('-l')
arguments.append(
os.path.basename(os.path.splitext(
unicode(self.getParameterValue(self.INPUT)))[0]))
os.path.basename(os.path.splitext(unicode(self.getParameterValue(self.INPUT)))[0]))
arguments.append(unicode(self.getParameterValue(self.INPUT)))

arguments.append(unicode(self.getOutputValue(self.OUTPUT)))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass/GrassAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def defineCharacteristicsFromFile(self):
line = lines.readline().strip('\n').strip()
except Exception, e:
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
self.tr('Could not open GRASS algorithm: %s.\n%s' % (self.descriptionFile, line))
self.tr('Could not open GRASS algorithm: %s.\n%s' % (self.descriptionFile, line)))
raise e
lines.close()

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/lidar/fusion/FusionUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def runFusion(commands, progress):
loglines = []
loglines.append(
QCoreApplication.translate('FusionUtils',
'Fusion execution console output')
'Fusion execution console output'))
proc = subprocess.Popen(
commands,
shell=True,
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/lidar/lastools/las2shp.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ def processAlgorithm(self, progress):
commands.append(str(record_size))
commands.append("-o")
commands.append(self.getOutputValue(las2shp.OUTPUT))
self.addParametersAdditionalCommands(commands)
self.addParametersAdditionalCommands(commands)

LAStoolsUtils.runLAStools(commands, progress)
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/lidar/lastools/las2txt.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ def processAlgorithm(self, progress):
commands.append(parse)
commands.append("-o")
commands.append(self.getOutputValue(las2txt.OUTPUT))
self.addParametersAdditionalCommands(commands)
self.addParametersAdditionalCommands(commands)

LAStoolsUtils.runLAStools(commands, progress)
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/lidar/lastools/lasgroundPro.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def defineCharacteristics(self):
self.addParametersOutputDirectoryGUI()
self.addParametersOutputAppendixGUI()
self.addParametersPointOutputFormatGUI()
self.addParametersAdditionalGUI()
self.addParametersAdditionalGUI()
self.addParametersCoresGUI()
self.addParametersVerboseGUI()

Expand All @@ -77,7 +77,7 @@ def processAlgorithm(self, progress):
self.addParametersOutputDirectoryCommands(commands)
self.addParametersOutputAppendixCommands(commands)
self.addParametersPointOutputFormatCommands(commands)
self.addParametersAdditionalCommands(commands)
self.addParametersAdditionalCommands(commands)
self.addParametersCoresCommands(commands)

LAStoolsUtils.runLAStools(commands, progress)
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/lidar/lastools/laszipPro.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def defineCharacteristics(self):
self.addParametersOutputDirectoryGUI()
self.addParametersOutputAppendixGUI()
self.addParametersPointOutputFormatGUI()
self.addParametersAdditionalGUI()
self.addParametersAdditionalGUI()
self.addParametersCoresGUI()
self.addParametersVerboseGUI()

Expand All @@ -66,7 +66,7 @@ def processAlgorithm(self, progress):
self.addParametersOutputDirectoryCommands(commands)
self.addParametersOutputAppendixCommands(commands)
self.addParametersPointOutputFormatCommands(commands)
self.addParametersAdditionalCommands(commands)
self.addParametersAdditionalCommands(commands)
self.addParametersCoresCommands(commands)

LAStoolsUtils.runLAStools(commands, progress)
6 changes: 3 additions & 3 deletions python/plugins/processing/algs/qgis/Clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def processAlgorithm(self, progress):
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
self.tr('GEOS geoprocessing error: One or '
'more input features have invalid '
'geometry.')
'geometry.'))
break
if found:
try:
Expand All @@ -116,12 +116,12 @@ def processAlgorithm(self, progress):
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
self.tr('Feature geometry error: One or more '
'output features ignored due to '
'invalid geometry.')
'invalid geometry.'))
continue
except:
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
self.tr('GEOS geoprocessing error: One or more '
'input features have invalid geometry.')
'input features have invalid geometry.'))
continue

current += 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterNumber(self.INTERVAL,
self.tr('Interval between vertices to add'), 0.0, 10000000.0, 1.0))

self.addOutput(OutputVector(self.OUTPUT,
self.tr('Densified layer'))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Densified layer')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/Eliminate.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def processAlgorithm(self, progress):

if inLayer.selectedFeatureCount() == 0:
ProcessingLog.addToLog(ProcessingLog.LOG_WARNING,
self.tr('%s: (No selection in input layer "%s")' % (self.commandLineName(), self.getParameterValue(self.INPUT)))
self.tr('%s: (No selection in input layer "%s")' % (self.commandLineName(), self.getParameterValue(self.INPUT))))

# Keep references to the features to eliminate
featToEliminate = []
Expand Down
10 changes: 2 additions & 8 deletions python/plugins/processing/algs/qgis/FieldPyculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,7 @@ def processAlgorithm(self, progress):
exec bytecode in new_ns
except:
raise GeoAlgorithmExecutionException(
self.tr("FieldPyculator code execute error\n"
"Global code block can't be executed!%s \n %s"
% (unicode(sys.exc_info()[0].__name__),
unicode(sys.exc_info()[1])))
self.tr("FieldPyculator code execute error.Global code block can't be executed!\n%s\n%s" % (unicode(sys.exc_info()[0].__name__), unicode(sys.exc_info()[1]))))

# Replace all fields tags
fields = provider.fields()
Expand All @@ -126,10 +123,7 @@ def processAlgorithm(self, progress):
bytecode = compile(code, '<string>', 'exec')
except:
raise GeoAlgorithmExecutionException(
self.tr("FieldPyculator code execute error\n"
"Field code block can't be executed! %s \n %s"
% (unicode(sys.exc_info()[0].__name__),
unicode(sys.exc_info()[1])))
self.tr("FieldPyculator code execute error.Field code block can't be executed!\n%s\n%s" % (unicode(sys.exc_info()[0].__name__), unicode(sys.exc_info()[1]))))

# Run
features = vector.features(layer)
Expand Down

0 comments on commit d8a224d

Please sign in to comment.