[QGIS-Developer] Creating a spatial index on a table created with QgsVectorLayerExporter Python function

Andrea Giudiceandrea andreaerdna at libero.it
Sun Mar 14 05:01:33 PDT 2021


Bo Victor Thomsen wrote
> # Experiment for getting spatial index. Tried with 1, True ...
> options = {}
> options['spatial_index'] = 'on'

Hi Bo Victor,
AFAIK it should be:

options = {}
options['layerOptions'] = ['SPATIAL_INDEX=YES']

Regards.

Andrea



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html


More information about the QGIS-Developer mailing list