[processing] Add test, help for create spatial index alg

This commit is contained in:
Nyall Dawson 2017-01-06 09:49:24 +10:00
parent 7a7f11980e
commit e7e9ba0efc
3 changed files with 18 additions and 1 deletions

View File

@ -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.

View File

@ -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"))

View File

@ -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