Skip to content
Permalink
Browse files

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

  • Loading branch information
nyalldawson committed Jan 6, 2017
1 parent 7a7f119 commit e7e9ba0efc66761193e98b384dda318609cac05c
@@ -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.

@@ -62,7 +62,7 @@ def processAlgorithm(self, progress):

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

0 comments on commit e7e9ba0

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