Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Prevent spatialindex creation by default on GPKG
- Loading branch information
Showing
with
4 additions
and
1 deletion.
-
+4
−1
src/app/browser/qgsinbuiltdataitemproviders.cpp
|
@@ -923,7 +923,10 @@ void QgsDatabaseItemGuiProvider::populateContextMenu( QgsDataItem *item, QMenu * |
|
|
geometryType != QgsWkbTypes::Unknown }; |
|
|
const QgsCoordinateReferenceSystem crs { dlg.crs( ) }; |
|
|
// This flag tells to the provider that field types do not need conversion |
|
|
QMap<QString, QVariant> options { { QStringLiteral( "skipConvertFields" ), true } }; |
|
|
// also prevents GDAL to create a spatial index by default for GPKG, we are |
|
|
// going to create it afterwards in a unified manner for all providers. |
|
|
QMap<QString, QVariant> options { { QStringLiteral( "skipConvertFields" ), true }, |
|
|
{ QStringLiteral( "layerOptions" ), QStringLiteral( "SPATIAL_INDEX=NO" ) } }; |
|
|
|
|
|
if ( ! geometryColumn.isEmpty() ) |
|
|
{ |
|
|