Skip to content
Permalink
Browse files

[processing] use bulk features loading to speedup spatial index creation

(cherry picked from commit 2d9b2a3)
  • Loading branch information
alexbruy committed Jun 21, 2016
1 parent 672c229 commit 55fc3eeabb8937792d56971f960cbed16caf666f
Showing with 1 addition and 4 deletions.
  1. +1 −4 python/plugins/processing/tools/vector.py
@@ -201,10 +201,7 @@ def testForUniqueness(fieldList1, fieldList2):
def spatialindex(layer):
"""Creates a spatial index for the passed vector layer.
"""
idx = QgsSpatialIndex()
feats = features(layer)
for ft in feats:
idx.insertFeature(ft)
idx = QgsSpatialIndex(layer.getFeatures())
return idx


0 comments on commit 55fc3ee

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