Skip to content
Permalink
Browse files

[processing] Basic stats algs should allow non-spatial tables

  • Loading branch information
nyalldawson committed Nov 30, 2016
1 parent ab29f2d commit b0662f908a217abcbcfee4519dc572b844a50a37
@@ -32,11 +32,10 @@
from qgis.PyQt.QtGui import QIcon

from qgis.core import (QgsStatisticalSummary,
QgsFeatureRequest,
NULL)
QgsFeatureRequest)

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTable
from processing.core.parameters import ParameterTableField
from processing.core.outputs import OutputHTML
from processing.core.outputs import OutputNumber
@@ -76,8 +75,8 @@ def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Basic statistics for numeric fields')
self.group, self.i18n_group = self.trAlgorithm('Vector table tools')

self.addParameter(ParameterVector(self.INPUT_LAYER,
self.tr('Input vector layer')))
self.addParameter(ParameterTable(self.INPUT_LAYER,
self.tr('Input vector layer')))
self.addParameter(ParameterTableField(self.FIELD_NAME,
self.tr('Field to calculate statistics on'),
self.INPUT_LAYER, ParameterTableField.DATA_TYPE_NUMBER))
@@ -35,7 +35,7 @@
QgsFeatureRequest)

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterTable
from processing.core.parameters import ParameterTableField
from processing.core.outputs import OutputHTML
from processing.core.outputs import OutputNumber
@@ -67,8 +67,8 @@ def defineCharacteristics(self):
self.name, self.i18n_name = self.trAlgorithm('Basic statistics for text fields')
self.group, self.i18n_group = self.trAlgorithm('Vector table tools')

self.addParameter(ParameterVector(self.INPUT_LAYER,
self.tr('Input vector layer')))
self.addParameter(ParameterTable(self.INPUT_LAYER,
self.tr('Input vector layer')))
self.addParameter(ParameterTableField(self.FIELD_NAME,
self.tr('Field to calculate statistics on'),
self.INPUT_LAYER, ParameterTableField.DATA_TYPE_STRING))

0 comments on commit b0662f9

Please sign in to comment.
You can’t perform that action at this time.