Skip to content


Browse files Browse the repository at this point in the history
[processing] Add test, help for create spatial index alg
  • Loading branch information
nyalldawson committed Jan 6, 2017
1 parent 7a7f119 commit e7e9ba0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions python/plugins/processing/algs/help/qgis.yaml
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/
Expand Up @@ -62,7 +62,7 @@ def processAlgorithm(self, progress):

if provider.capabilities() & QgsVectorDataProvider.CreateSpatialIndex:
if not provider.createSpatialIndex():
progress.setInfo('Can not create spatial index'))
progress.setInfo('Could not create spatial index'))
progress.setInfo("Layer's data provider does not support "
"spatial indexes"))
Expand Down
14 changes: 14 additions & 0 deletions python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml
Expand Up @@ -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
name: custom/points.shp
type: vector
in_place: true
name: expected/create_attr_index_points.shp
type: vector
in_place_result: true

0 comments on commit e7e9ba0

Please sign in to comment.