I am trying to create a spatial index for some shapefiles using the Qgis API. I have followed the steps described in Nathan Woodrow's blog (https://nathanw.net/2013/01/04/using-a-qgis-spatial-index-to-speed-up-your-code/) and it works great:
layer = QgsVectorLayer(path, name, 'ogr') idx = QgsSpatialIndex() all_features = layer.getFeatures() map(idx.insertFeature, all_features)
My problem is that I don't have any resulting file (.qix ? .sbn ? .sbx ?)
How can I save this spatial index so that future users of the shapefiles can benefit from it ?