Skip to content
Permalink
Browse files

[processing] Create Attribute Index can run on non-spatial layers

  • Loading branch information
nyalldawson committed May 15, 2018
1 parent 483b4ff commit 0383a148257c2f055c9596090d7e8969b54ebc96
Showing with 3 additions and 1 deletion.
  1. +3 −1 python/plugins/processing/algs/qgis/CreateAttributeIndex.py
@@ -27,6 +27,7 @@

from qgis.core import (QgsVectorDataProvider,
QgsFields,
QgsProcessing,
QgsProcessingAlgorithm,
QgsProcessingParameterVectorLayer,
QgsProcessingParameterField,
@@ -52,7 +53,8 @@ def __init__(self):

def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterVectorLayer(self.INPUT,
self.tr('Input Layer')))
self.tr('Input Layer'),
types=[QgsProcessing.TypeVector]))
self.addParameter(QgsProcessingParameterField(self.FIELD,
self.tr('Attribute to index'), None, self.INPUT))
self.addOutput(QgsProcessingOutputVectorLayer(self.OUTPUT, self.tr('Indexed layer')))

1 comment on commit 0383a14

@nirvn

This comment has been minimized.

Copy link
Contributor

@nirvn nirvn commented on 0383a14 May 15, 2018

@nyalldawson , isn't this useful for non spatial layers too? I've created indexes on geometryless tables to speed up joins.

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