diff --git a/python/plugins/processing/algs/help/qgis.yaml b/python/plugins/processing/algs/help/qgis.yaml index be9c23804fe..79b2ad94357 100644 --- a/python/plugins/processing/algs/help/qgis.yaml +++ b/python/plugins/processing/algs/help/qgis.yaml @@ -114,6 +114,9 @@ qgis:createpointsalonglines: > Start and end points can be defined, so the first and last point do not fall on the line first and last node. Start and end points are defined as distances, mesaureed from the first and last nodes of the lines, in the units of the projection used by the lines layer. +qgis:createspatialindex: > + Creates an index to speed up access to the features in a layer based on their spatial location. Support for spatial index creation is dependent on the layer's data provider. + qgis:delaunaytriangulation: > This algorithm creates a polygon layer with the delaunay triangulation corresponding to a points layer. diff --git a/python/plugins/processing/algs/qgis/SpatialIndex.py b/python/plugins/processing/algs/qgis/SpatialIndex.py index 75cc74ef4e2..d517329ef63 100644 --- a/python/plugins/processing/algs/qgis/SpatialIndex.py +++ b/python/plugins/processing/algs/qgis/SpatialIndex.py @@ -62,7 +62,7 @@ class SpatialIndex(GeoAlgorithm): if provider.capabilities() & QgsVectorDataProvider.CreateSpatialIndex: if not provider.createSpatialIndex(): - progress.setInfo(self.tr('Can not create spatial index')) + progress.setInfo(self.tr('Could not create spatial index')) else: progress.setInfo(self.tr("Layer's data provider does not support " "spatial indexes")) diff --git a/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml b/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml index 9d62d30e43d..67022ca8df4 100644 --- a/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml +++ b/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml @@ -2104,3 +2104,17 @@ tests: name: expected/create_attr_index_points.shp type: vector in_place_result: true + + - algorithm: qgis:createspatialindex + name: Create spatial index + params: + INPUT: + name: custom/points.shp + type: vector + in_place: true + results: + INPUT: + name: expected/create_attr_index_points.shp + type: vector + in_place_result: true +