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

Bo Victor Thomsen bo.victor.thomsen at gmail.com
Sun Mar 14 06:32:15 PDT 2021


Hi Andrea -

Close but no cigar. (aka.: It didn't work). But thanks for trying

I think, it would work if the dataprovider was "ogr" and not "postgres"

Med venlig hilsen / Kind regards

Bo Victor Thomsen

Den 14-03-2021 kl. 13:01 skrev Andrea Giudiceandrea:
> 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
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the QGIS-Developer mailing list