Skip to content
Permalink
Browse files
Uniform and informative output names for Processing (QGIS, final)
  • Loading branch information
pcav committed May 22, 2015
1 parent 4c871bb commit 2004f22ac5c39839913157b067baeed6cb207882
@@ -63,7 +63,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterNumber(self.FIELD_PRECISION,
self.tr('Field precision'), 0, 10, 0))
self.addOutput(OutputVector(
self.OUTPUT_LAYER, self.tr('Output layer')))
self.OUTPUT_LAYER, self.tr('Added')))

def processAlgorithm(self, progress):
fieldType = self.getParameterValue(self.FIELD_TYPE)
@@ -69,4 +69,4 @@ def defineCharacteristics(self):
self.group = 'Vector table tools'
self.addParameter(ParameterVector(self.INPUT,
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_ANY]))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Incremented')))
@@ -63,7 +63,7 @@ def defineCharacteristics(self):
self.INPUT_LAYER, ParameterTableField.DATA_TYPE_NUMBER))

self.addOutput(OutputHTML(self.OUTPUT_HTML_FILE,
self.tr('Statistics for numeric field')))
self.tr('Statistics')))

self.addOutput(OutputNumber(self.CV, self.tr('Coefficient of Variation')))
self.addOutput(OutputNumber(self.MIN, self.tr('Minimum value')))
@@ -61,7 +61,7 @@ def defineCharacteristics(self):
self.INPUT_LAYER, ParameterTableField.DATA_TYPE_STRING))

self.addOutput(OutputHTML(self.OUTPUT_HTML_FILE,
self.tr('Statistics for text field')))
self.tr('Statistics for text')))

self.addOutput(OutputNumber(self.MIN_LEN, self.tr('Minimum length')))
self.addOutput(OutputNumber(self.MAX_LEN, self.tr('Maximum length')))
@@ -46,7 +46,7 @@ def defineCharacteristics(self):
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterTableField(self.COLUMN,
self.tr('Field to delete'), self.INPUT))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Deleted column')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
@@ -78,4 +78,4 @@ def defineCharacteristics(self):
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterTableField(self.FIELD,
self.tr('Class field'), self.INPUT))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Numeric field')))
@@ -51,7 +51,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterSelection(self.METHOD,
self.tr('Calculate using'), self.CALC_METHODS, 0))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Added geom info')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
@@ -71,7 +71,7 @@ def defineCharacteristics(self):
self.tr('Global expression'), multiline=True, optional=True))
self.addParameter(ParameterString(self.FORMULA,
self.tr('Formula'), 'value = ', multiline=True))
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Calculated')))

def processAlgorithm(self, progress):
fieldName = self.getParameterValue(self.FIELD_NAME)
@@ -70,7 +70,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterBoolean(self.NEW_FIELD,
self.tr('Create new field'), True))
self.addParameter(ParameterString(self.FORMULA, self.tr('Formula')))
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Calculated')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT_LAYER))
@@ -56,7 +56,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterFieldsMapping(self.FIELDS_MAPPING,
self.tr('Fields mapping'), self.INPUT_LAYER))
self.addOutput(OutputVector(self.OUTPUT_LAYER,
self.tr('Output layer')))
self.tr('Refactored')))

def getCustomParametersDialog(self):
return FieldsMapperParametersDialog(self)
@@ -53,7 +53,7 @@ def defineCharacteristics(self):
self.tr('Field with categories'),
self.INPUT_LAYER, ParameterTableField.DATA_TYPE_ANY))

self.addOutput(OutputTable(self.OUTPUT, self.tr('Statistics')))
self.addOutput(OutputTable(self.OUTPUT, self.tr('Statistics by category')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT_LAYER))
@@ -48,7 +48,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterTableField(self.FIELD,
self.tr('Text attribute to convert to float'),
self.INPUT, ParameterTableField.DATA_TYPE_STRING))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Float from text')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT))
@@ -1,8 +1,8 @@
##Vector table tools=group
##input=vector
##class_field=field input
##value_field=field input
##output=output vector
##Input=vector
##Class_field=field input
##Value_field=field input
##N unique values=output vector

from PyQt4.Qt import QVariant

0 comments on commit 2004f22

Please sign in to comment.