Skip to content

Commit

Permalink
Uniform and informative output names for Processing (QGIS, Take #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcav committed May 22, 2015
1 parent 5910adf commit 7dacddc
Show file tree
Hide file tree
Showing 48 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/BarPlot.py
Expand Up @@ -54,7 +54,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterTableField(self.VALUE_FIELD,
self.tr('Value field'), self.INPUT))

self.addOutput(OutputHTML(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputHTML(self.OUTPUT, self.tr('Bar plot')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/Centroids.py
Expand Up @@ -45,7 +45,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterVector(self.INPUT_LAYER,
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_POLYGON]))

self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Centroids')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down
Expand Up @@ -49,7 +49,7 @@ def defineCharacteristics(self):
self.tr('Constant value'), default=1.0))

self.addOutput(OutputRaster(self.OUTPUT,
self.tr('Output layer')))
self.tr('Constant')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down
Expand Up @@ -42,7 +42,7 @@ def defineCharacteristics(self):

self.addParameter(ParameterVector(self.INPUT,
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_ANY]))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Cleaned')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/qgis/DeleteHoles.py
Expand Up @@ -41,7 +41,7 @@ def defineCharacteristics(self):

self.addParameter(ParameterVector(self.INPUT,
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_POLYGON]))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Cleaned')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down Expand Up @@ -78,4 +78,4 @@ def processAlgorithm(self, progress):
writer.addFeature(feat)
progress.setPercentage(int(count * total))

del writer
del writer
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/DensifyGeometries.py
Expand Up @@ -51,7 +51,7 @@ def defineCharacteristics(self):
self.tr('Vertices to add'), 1, 10000000, 1))

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

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down
Expand Up @@ -53,7 +53,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')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/Eliminate.py
Expand Up @@ -80,7 +80,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterSelection(self.MODE,
self.tr('Merge selection with the neighbouring polygon with the'),
self.MODES))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Cleaned layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Cleaned')))

def processAlgorithm(self, progress):
inLayer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/Explode.py
Expand Up @@ -87,4 +87,4 @@ def defineCharacteristics(self):
self.group = 'Vector geometry tools'
self.addParameter(ParameterVector(self.INPUT,
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_LINE]))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Exploded')))
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/ExtentFromLayer.py
Expand Up @@ -50,7 +50,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterBoolean(self.BY_FEATURE,
self.tr('Calculate extent for each feature separately'), False))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Extent')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/ExtractNodes.py
Expand Up @@ -45,7 +45,7 @@ def defineCharacteristics(self):
self.tr('Input layer'),
[ParameterVector.VECTOR_TYPE_POLYGON, ParameterVector.VECTOR_TYPE_LINE]))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Nodes')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/GeometryConvert.py
Expand Up @@ -55,7 +55,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterSelection(self.TYPE,
self.tr('New geometry type'), self.TYPES))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Converted')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/Gridify.py
Expand Up @@ -52,7 +52,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterNumber(self.VSPACING,
self.tr('Vertical spacing'), default=0.1))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Snapped')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/HubDistance.py
Expand Up @@ -72,7 +72,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterSelection(self.UNIT,
self.tr('Measurement unit'), self.UNITS))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Hub distance')))

def processAlgorithm(self, progress):
layerPoints = dataobjects.getObjectFromUri(
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/HubLines.py
Expand Up @@ -54,7 +54,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterTableField(self.SPOKE_FIELD,
self.tr('Spoke ID field'), self.SPOKES))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Hub lines')))

def processAlgorithm(self, progress):
layerHub = dataobjects.getObjectFromUri(
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/HypsometricCurves.py
Expand Up @@ -67,7 +67,7 @@ def defineCharacteristics(self):
self.tr('Use % of area instead of absolute value'), False))

self.addOutput(OutputDirectory(self.OUTPUT_DIRECTORY,
self.tr('Output directory')))
self.tr('Hypsometric curves')))

def processAlgorithm(self, progress):
rasterPath = self.getParameterValue(self.INPUT_DEM)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/JoinAttributes.py
Expand Up @@ -55,7 +55,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterTableField(self.TABLE_FIELD_2,
self.tr('Table field 2'), self.INPUT_LAYER_2))
self.addOutput(OutputVector(self.OUTPUT_LAYER,
self.tr('Output layer')))
self.tr('Joined layer')))

def processAlgorithm(self, progress):
input = self.getParameterValue(self.INPUT_LAYER)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/LinesToPolygons.py
Expand Up @@ -44,7 +44,7 @@ def defineCharacteristics(self):

self.addParameter(ParameterVector(self.INPUT,
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_LINE]))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Polygons from lines')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/MeanAndStdDevPlot.py
Expand Up @@ -60,7 +60,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterTableField(self.STDDEV_FIELD,
self.tr('StdDev field'), self.INPUT))

self.addOutput(OutputHTML(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputHTML(self.OUTPUT, self.tr('Plot')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/MeanCoords.py
Expand Up @@ -55,7 +55,7 @@ def defineCharacteristics(self):
self.tr('Unique ID field'), MeanCoords.POINTS,
ParameterTableField.DATA_TYPE_NUMBER, optional=True))

self.addOutput(OutputVector(MeanCoords.OUTPUT, self.tr('Result')))
self.addOutput(OutputVector(MeanCoords.OUTPUT, self.tr('Mean coordinates')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.POINTS))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/Merge.py
Expand Up @@ -46,7 +46,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterVector(self.LAYER2,
self.tr('Input layer 2'), [ParameterVector.VECTOR_TYPE_ANY]))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Merged')))

def processAlgorithm(self, progress):
layer1 = dataobjects.getObjectFromUri(
Expand Down
Expand Up @@ -48,7 +48,7 @@ def defineCharacteristics(self):
self.group = 'Vector geometry tools'

self.addParameter(ParameterVector(self.INPUT, self.tr('Input layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Single parts')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT))
Expand Down
Expand Up @@ -53,7 +53,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterVector(self.POINTS,
self.tr('Points'), [ParameterVector.VECTOR_TYPE_POINT]))

self.addOutput(OutputHTML(self.OUTPUT, self.tr('Result')))
self.addOutput(OutputHTML(self.OUTPUT, self.tr('Nearest neighbour')))

self.addOutput(OutputNumber(self.OBSERVED_MD,
self.tr('Observed mean distance')))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/PointsDisplacement.py
Expand Up @@ -53,7 +53,7 @@ def defineCharacteristics(self):
0.00001, 999999999.999990, 0.00015))
self.addParameter(ParameterBoolean(self.HORIZONTAL,
self.tr('Horizontal distribution for two point case')))
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Displaced')))

def processAlgorithm(self, progress):
radius = self.getParameterValue(self.DISTANCE)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/PointsFromLines.py
Expand Up @@ -50,7 +50,7 @@ def defineCharacteristics(self):
self.tr('Raster layer')))
self.addParameter(ParameterVector(self.INPUT_VECTOR,
self.tr('Vector layer'), [ParameterVector.VECTOR_TYPE_LINE]))
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Points along line')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT_VECTOR))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/PointsFromPolygons.py
Expand Up @@ -50,7 +50,7 @@ def defineCharacteristics(self):
self.tr('Raster layer')))
self.addParameter(ParameterVector(self.INPUT_VECTOR,
self.tr('Vector layer'), [ParameterVector.VECTOR_TYPE_POLYGON]))
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Points from polygons')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT_VECTOR))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/PointsInPolygon.py
Expand Up @@ -51,7 +51,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterString(self.FIELD,
self.tr('Count field name'), 'NUMPOINTS'))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Result')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Count')))

def processAlgorithm(self, progress):
polyLayer = dataobjects.getObjectFromUri(self.getParameterValue(self.POLYGONS))
Expand Down
Expand Up @@ -54,7 +54,7 @@ def defineCharacteristics(self):
self.tr('Class field'), self.POINTS))
self.addParameter(ParameterString(self.FIELD,
self.tr('Count field name'), 'NUMPOINTS'))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Result')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Unique count')))

def processAlgorithm(self, progress):
polyLayer = dataobjects.getObjectFromUri(self.getParameterValue(self.POLYGONS))
Expand Down
Expand Up @@ -61,7 +61,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterString(self.FIELD,
self.tr('Count field name'), 'NUMPOINTS'))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Result')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Weighted count')))

def processAlgorithm(self, progress):
polyLayer = dataobjects.getObjectFromUri(self.getParameterValue(self.POLYGONS))
Expand Down
Expand Up @@ -88,4 +88,4 @@ def defineCharacteristics(self):
self.tr('Y field'), self.INPUT, ParameterTableField.DATA_TYPE_ANY))
self.addParameter(ParameterCrs(self.TARGET_CRS,
self.tr('Target CRS'), 'EPSG:4326'))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Points from table')))
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/PolarPlot.py
Expand Up @@ -56,7 +56,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterTableField(self.VALUE_FIELD,
self.tr('Value field'), self.INPUT))

self.addOutput(OutputHTML(self.OUTPUT, self.tr('Output')))
self.addOutput(OutputHTML(self.OUTPUT, self.tr('Polar plot')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/Polygonize.py
Expand Up @@ -113,4 +113,4 @@ def defineCharacteristics(self):
self.tr('Keep table structure of line layer'), False))
self.addParameter(ParameterBoolean(self.GEOMETRY,
self.tr('Create geometry columns'), True))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Polygons from lines')))
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/PolygonsToLines.py
Expand Up @@ -45,7 +45,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterVector(self.INPUT,
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_POLYGON]))

self.addOutput(OutputVector(self.OUTPUT, self.tr('Output layer')))
self.addOutput(OutputVector(self.OUTPUT, self.tr('Lines from polygons')))

def processAlgorithm(self, progress):
layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT))
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/qgis/RasterLayerHistogram.py
Expand Up @@ -56,8 +56,8 @@ def defineCharacteristics(self):
self.addParameter(ParameterNumber(self.BINS,
self.tr('Number of bins'), 2, None, 10))

self.addOutput(OutputHTML(self.PLOT, self.tr('Output plot')))
self.addOutput(OutputTable(self.TABLE, self.tr('Output table')))
self.addOutput(OutputHTML(self.PLOT, self.tr('Histogram')))
self.addOutput(OutputTable(self.TABLE, self.tr('Table')))


def processAlgorithm(self, progress):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/ReprojectLayer.py