mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Merge pull request #5867 from alexbruy/processing-group
[processing] add groupId() method to get untranslated algorithm group
This commit is contained in:
commit
db07bc6c07
@ -22,7 +22,7 @@ class QgsProcessingModelAlgorithm : QgsProcessingAlgorithm
|
||||
%End
|
||||
public:
|
||||
|
||||
QgsProcessingModelAlgorithm( const QString &name = QString(), const QString &group = QString() );
|
||||
QgsProcessingModelAlgorithm( const QString &name = QString(), const QString &group = QString(), const QString &groupId = QString() );
|
||||
%Docstring
|
||||
Constructor for QgsProcessingModelAlgorithm.
|
||||
%End
|
||||
@ -36,6 +36,8 @@ class QgsProcessingModelAlgorithm : QgsProcessingAlgorithm
|
||||
|
||||
virtual QString group() const;
|
||||
|
||||
virtual QString groupId() const;
|
||||
|
||||
virtual QIcon icon() const;
|
||||
|
||||
virtual QString svgIconPath() const;
|
||||
|
@ -158,10 +158,20 @@ class QgsProcessingAlgorithm
|
||||
%Docstring
|
||||
Returns the name of the group this algorithm belongs to. This string
|
||||
should be localised.
|
||||
.. seealso:: :py:func:`groupId()`
|
||||
.. seealso:: :py:func:`tags()`
|
||||
:rtype: str
|
||||
%End
|
||||
|
||||
virtual QString groupId() const;
|
||||
%Docstring
|
||||
Returns the unique ID of the group this algorithm belongs to. This string
|
||||
should be fixed for the algorithm, and must not be localised. The group id
|
||||
should be unique within each provider. Group id should contain lowercase
|
||||
alphanumeric characters only and no spaces or other formatting characters.
|
||||
.. seealso:: :py:func:`group()`
|
||||
:rtype: str
|
||||
%End
|
||||
virtual Flags flags() const;
|
||||
%Docstring
|
||||
Returns the flags indicating how and when the algorithm operates and should be exposed to users.
|
||||
|
@ -70,6 +70,9 @@ class AssignProjection(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster projections')
|
||||
|
||||
def group(self):
|
||||
return 'rasterprojections'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
|
||||
fileName = inLayer.source()
|
||||
|
@ -95,6 +95,9 @@ class Buffer(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geoprocessing')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeoprocessing'
|
||||
|
||||
def commandName(self):
|
||||
return 'ogr2ogr'
|
||||
|
||||
|
@ -99,6 +99,9 @@ class ClipRasterByExtent(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster extraction')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterextraction'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'raster-clip.png'))
|
||||
|
||||
|
@ -116,6 +116,9 @@ class ClipRasterByMask(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster extraction')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterextraction'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
|
||||
|
||||
|
@ -71,6 +71,9 @@ class ClipVectorByExtent(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geoprocessing')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeoprocessing'
|
||||
|
||||
def commandName(self):
|
||||
return 'ogr2ogr'
|
||||
|
||||
|
@ -70,6 +70,9 @@ class ClipVectorByMask(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geoprocessing')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeoprocessing'
|
||||
|
||||
def commandName(self):
|
||||
return 'ogr2ogr'
|
||||
|
||||
|
@ -92,6 +92,9 @@ class ColorRelief(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = ['color-relief']
|
||||
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
|
||||
|
@ -106,6 +106,9 @@ class Dissolve(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geoprocessing')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeoprocessing'
|
||||
|
||||
def commandName(self):
|
||||
return 'ogr2ogr'
|
||||
|
||||
|
@ -82,6 +82,9 @@ class ExecuteSql(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectormiscellaneous'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
ogrLayer, layerName = self.getOgrCompatibleSource(self.INPUT, parameters, context, feedback, executing)
|
||||
sql = self.parameterAsString(parameters, self.SQL, context)
|
||||
|
@ -132,6 +132,9 @@ class GridAverage(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))
|
||||
|
||||
|
@ -149,6 +149,9 @@ class GridDataMetrics(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
ogrLayer, layerName = self.getOgrCompatibleSource(self.INPUT, parameters, context, feedback, executing)
|
||||
|
||||
|
@ -152,6 +152,9 @@ class GridInverseDistance(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))
|
||||
|
||||
|
@ -139,6 +139,9 @@ class GridInverseDistanceNearestNeighbor(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))
|
||||
|
||||
|
@ -114,6 +114,9 @@ class GridLinear(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))
|
||||
|
||||
|
@ -127,6 +127,9 @@ class GridNearestNeighbor(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'grid.png'))
|
||||
|
||||
|
@ -78,6 +78,9 @@ class OffsetCurve(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geoprocessing')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeoprocessing'
|
||||
|
||||
def commandName(self):
|
||||
return 'ogr2ogr'
|
||||
|
||||
|
@ -162,6 +162,9 @@ class OgrToPostGis(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectormiscellaneous'
|
||||
|
||||
def getConnectionString(self, parameters, context):
|
||||
host = self.parameterAsString(parameters, self.HOST, context)
|
||||
port = self.parameterAsString(parameters, self.PORT, context)
|
||||
|
@ -104,6 +104,9 @@ class OneSideBuffer(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geoprocessing')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeoprocessing'
|
||||
|
||||
def commandName(self):
|
||||
return 'ogr2ogr'
|
||||
|
||||
|
@ -83,6 +83,9 @@ class PointsAlongLines(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geoprocessing')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeoprocessing'
|
||||
|
||||
def commandName(self):
|
||||
return 'ogr2ogr'
|
||||
|
||||
|
@ -93,6 +93,9 @@ class aspect(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = ['aspect']
|
||||
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
|
||||
|
@ -100,6 +100,9 @@ class buildvrt(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'rastermiscellaneous'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = []
|
||||
arguments.append('-resolution')
|
||||
|
@ -118,6 +118,9 @@ class contour(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster extraction')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterextraction'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
|
||||
fieldName = self.parameterAsString(parameters, self.FIELD_NAME, context)
|
||||
|
@ -63,6 +63,9 @@ class ExtractProjection(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster projections')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterprojections'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
return ["extractprojection"]
|
||||
|
||||
|
@ -86,6 +86,9 @@ class fillnodata(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = []
|
||||
arguments.append('-md')
|
||||
|
@ -153,6 +153,9 @@ class gdal2tiles(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'rastermiscellaneous'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = []
|
||||
|
||||
|
@ -69,6 +69,9 @@ class gdal2xyz(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster conversion')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterconversion'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = []
|
||||
arguments = []
|
||||
|
@ -99,6 +99,9 @@ class gdaladdo(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'rastermiscellaneous'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'raster-overview.png'))
|
||||
|
||||
|
@ -102,6 +102,9 @@ class gdalcalc(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'rastermiscellaneous'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
out = self.getOutputValue(self.OUTPUT)
|
||||
extra = self.getParameterValue(self.EXTRA)
|
||||
|
@ -80,6 +80,9 @@ class gdalinfo(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'rastermiscellaneous'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'raster-info.png'))
|
||||
|
||||
|
@ -111,6 +111,9 @@ class gdaltindex(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'rastermiscellaneous'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'tiles.png'))
|
||||
|
||||
|
@ -120,6 +120,9 @@ class hillshade(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = ['hillshade']
|
||||
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
|
||||
|
@ -98,6 +98,9 @@ class merge(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'rastermiscellaneous'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'merge.png'))
|
||||
|
||||
|
@ -86,6 +86,9 @@ class nearblack(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'nearblack.png'))
|
||||
|
||||
|
@ -68,6 +68,9 @@ class ogr2ogr(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector conversion')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorconversion'
|
||||
|
||||
def commandName(self):
|
||||
return 'ogr2ogr'
|
||||
|
||||
|
@ -119,6 +119,9 @@ class Ogr2OgrTableToPostGisList(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectormiscellaneous'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
connection = self.DB_CONNECTIONS[self.getParameterValue(self.DATABASE)]
|
||||
uri = uri_from_name(connection)
|
||||
|
@ -176,6 +176,9 @@ class Ogr2OgrToPostGisList(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectormiscellaneous'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
connection = self.parameterAsString(parameters, self.DATABASE, context)
|
||||
uri = uri_from_name(connection)
|
||||
|
@ -68,6 +68,9 @@ class ogrinfo(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector miscellaneous')
|
||||
|
||||
def group(self):
|
||||
return 'vectormiscellaneous'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = ['ogrinfo']
|
||||
arguments.append('-al')
|
||||
|
@ -71,6 +71,9 @@ class pct2rgb(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster conversion')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterconversion'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', '8-to-24-bits.png'))
|
||||
|
||||
|
@ -79,6 +79,9 @@ class polygonize(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster conversion')
|
||||
|
||||
def group(self):
|
||||
return 'rasterconversion'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'polygonize.png'))
|
||||
|
||||
|
@ -128,6 +128,9 @@ class proximity(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
|
||||
distance = self.parameterAsDouble(parameters, self.MAX_DISTANCE, context)
|
||||
|
@ -94,6 +94,9 @@ class rasterize(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector conversion')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorconversion'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
inLayer = self.getParameterValue(self.INPUT)
|
||||
noData = self.getParameterValue(self.NO_DATA)
|
||||
|
@ -67,6 +67,9 @@ class rasterize_over(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector conversion')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorconversion'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
context = dataobjects.createContext()
|
||||
inLayer = QgsProcessingUtils.mapLayerFromString(self.getParameterValue(self.INPUT), context)
|
||||
|
@ -157,6 +157,9 @@ class retile(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster miscellaneous')
|
||||
|
||||
def groupId(self):
|
||||
return 'rastermiscellaneous'
|
||||
|
||||
def commandName(self):
|
||||
return "gdal_retile"
|
||||
|
||||
|
@ -70,6 +70,9 @@ class rgb2pct(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster conversion')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterconversion'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', '24-to-8-bits.png'))
|
||||
|
||||
|
@ -82,6 +82,9 @@ class roughness(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = ['roughness']
|
||||
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
|
||||
|
@ -81,6 +81,9 @@ class sieve(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'sieve.png'))
|
||||
|
||||
|
@ -97,6 +97,9 @@ class slope(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = ['slope']
|
||||
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
|
||||
|
@ -81,6 +81,9 @@ class tpi(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = ['TPI']
|
||||
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
|
||||
|
@ -104,6 +104,9 @@ class translate(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster conversion')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterconversion'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'translate.png'))
|
||||
|
||||
|
@ -80,6 +80,9 @@ class tri(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasteranalysis'
|
||||
|
||||
def getConsoleCommands(self, parameters, context, feedback, executing=True):
|
||||
arguments = ['TRI']
|
||||
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
|
||||
|
@ -146,6 +146,9 @@ class warp(GdalAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster projections')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterprojections'
|
||||
|
||||
def icon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'warp.png'))
|
||||
|
||||
|
@ -27,6 +27,7 @@ __revision__ = '$Format:%H$'
|
||||
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
import uuid
|
||||
import importlib
|
||||
|
||||
@ -98,6 +99,8 @@ class Grass7Algorithm(QgsProcessingAlgorithm):
|
||||
self._name = ''
|
||||
self._display_name = ''
|
||||
self._group = ''
|
||||
self._groupId = ''
|
||||
self.groupIdRegex = re.compile('^[^\s\(]+')
|
||||
self.grass7Name = ''
|
||||
self.params = []
|
||||
self.hardcodedStrings = []
|
||||
@ -138,6 +141,9 @@ class Grass7Algorithm(QgsProcessingAlgorithm):
|
||||
def group(self):
|
||||
return self._group
|
||||
|
||||
def groupId(self):
|
||||
return self._groupId
|
||||
|
||||
def icon(self):
|
||||
return QgsApplication.getThemeIcon("/providerGrass.svg")
|
||||
|
||||
@ -191,6 +197,7 @@ class Grass7Algorithm(QgsProcessingAlgorithm):
|
||||
# Read the grass group
|
||||
line = lines.readline().strip('\n').strip()
|
||||
self._group = QCoreApplication.translate("GrassAlgorithm", line)
|
||||
self._groupId = self.groupIdRegex.search(line).group(0).lower()
|
||||
hasRasterOutput = False
|
||||
hasRasterInput = False
|
||||
hasVectorInput = False
|
||||
|
@ -46,6 +46,9 @@ class AddTableField(QgisFeatureBasedAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector table')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectortable'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.type_names = [self.tr('Integer'),
|
||||
|
@ -57,6 +57,9 @@ class Aggregate(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def name(self):
|
||||
return 'aggregate'
|
||||
|
||||
|
@ -51,6 +51,9 @@ class Aspect(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster terrain analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterterrainanalysis'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -47,6 +47,9 @@ class BarPlot(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Graphics')
|
||||
|
||||
def groupId(self):
|
||||
return 'graphics'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -83,6 +83,9 @@ class BasicStatisticsForField(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectoranalysis'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -49,6 +49,9 @@ class BoxPlot(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Graphics')
|
||||
|
||||
def groupId(self):
|
||||
return 'graphics'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -68,6 +68,9 @@ class CheckValidity(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def tags(self):
|
||||
return self.tr('valid,invalid,detect').split(',')
|
||||
|
||||
|
@ -51,6 +51,9 @@ class ConcaveHull(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -43,6 +43,9 @@ class CreateAttributeIndex(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector general')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeneral'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -50,6 +50,9 @@ class CreateConstantRaster(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster tools')
|
||||
|
||||
def groupId(self):
|
||||
return 'rastertools'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -49,6 +49,9 @@ class Datasources2Vrt(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector general')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeneral'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -46,6 +46,9 @@ class DefineProjection(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector general')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeneral'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -61,6 +61,9 @@ class Delaunay(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -40,6 +40,9 @@ class DeleteColumn(QgisFeatureBasedAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector table')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectortable'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.fields_to_delete = []
|
||||
|
@ -40,6 +40,9 @@ class DeleteDuplicateGeometries(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector general')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeneral'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -48,6 +48,9 @@ class DeleteHoles(QgisFeatureBasedAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def name(self):
|
||||
return 'deleteholes'
|
||||
|
||||
|
@ -43,6 +43,9 @@ class DensifyGeometries(QgisFeatureBasedAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.vertices = None
|
||||
|
@ -39,6 +39,9 @@ class DensifyGeometriesInterval(QgisFeatureBasedAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.interval = None
|
||||
|
@ -54,6 +54,9 @@ class Difference(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector overlay')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectoroverlay'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -61,6 +61,9 @@ class EliminateSelection(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -43,6 +43,9 @@ class EquivalentNumField(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector table')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectortable'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -56,6 +56,9 @@ class ExecuteSQL(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector general')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeneral'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -44,6 +44,9 @@ class Explode(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -62,6 +62,9 @@ class ExportGeometryInfo(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.export_z = False
|
||||
|
@ -39,6 +39,9 @@ class ExtendLines(QgisFeatureBasedAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.start_distance = None
|
||||
|
@ -61,6 +61,9 @@ class ExtentFromLayer(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Layer tools')
|
||||
|
||||
def groupId(self):
|
||||
return 'layertools'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -50,6 +50,9 @@ class ExtractSpecificNodes(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -56,6 +56,9 @@ class FieldsPyculator(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector table')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectortable'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -60,6 +60,9 @@ class FieldsCalculator(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector table')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectortable'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.type_names = [self.tr('Float'),
|
||||
|
@ -46,6 +46,9 @@ class FieldsMapper(QgisFeatureBasedAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector table')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectortable'
|
||||
|
||||
def initParameters(self, config=None):
|
||||
|
||||
class ParameterFieldsMapping(QgsProcessingParameterDefinition):
|
||||
|
@ -59,6 +59,9 @@ class FindProjection(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector general')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeneral'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -62,6 +62,9 @@ class FixedDistanceBuffer(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -46,6 +46,9 @@ class GeometryByExpression(QgisFeatureBasedAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.geometry_types = [self.tr('Polygon'),
|
||||
|
@ -48,6 +48,9 @@ class GeometryConvert(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -70,6 +70,9 @@ class GridLine(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector creation')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorcreation'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -69,6 +69,9 @@ class GridPolygon(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector creation')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorcreation'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -69,6 +69,9 @@ class Heatmap(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Interpolation')
|
||||
|
||||
def groupId(self):
|
||||
return 'interpolation'
|
||||
|
||||
def name(self):
|
||||
return 'heatmapkerneldensityestimation'
|
||||
|
||||
|
@ -53,6 +53,9 @@ class Hillshade(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster terrain analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterterrainanalysis'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -66,6 +66,9 @@ class HubDistanceLines(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectoranalysis'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -62,6 +62,9 @@ class HubDistancePoints(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectoranalysis'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -56,6 +56,9 @@ class HypsometricCurves(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Raster terrain analysis')
|
||||
|
||||
def groupId(self):
|
||||
return 'rasterterrainanalysis'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -98,6 +98,9 @@ class IdwInterpolation(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Interpolation')
|
||||
|
||||
def groupId(self):
|
||||
return 'interpolation'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -57,6 +57,9 @@ class ImportIntoPostGIS(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Database')
|
||||
|
||||
def groupId(self):
|
||||
return 'database'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -57,6 +57,9 @@ class ImportIntoSpatialite(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Database')
|
||||
|
||||
def groupId(self):
|
||||
return 'database'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -62,6 +62,9 @@ class Intersection(QgisAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector overlay')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectoroverlay'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
@ -59,6 +59,9 @@ class LinesToPolygons(QgisFeatureBasedAlgorithm):
|
||||
def group(self):
|
||||
return self.tr('Vector geometry')
|
||||
|
||||
def groupId(self):
|
||||
return 'vectorgeometry'
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user