mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
[processing] Add test, help for create spatial index alg
This commit is contained in:
parent
7a7f11980e
commit
e7e9ba0efc
@ -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 @@ 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"))
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user