@@ -1270,6 +1270,7 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
12701270 )
12711271 );
12721272
1273+ // SQLite
12731274 // SQLite
12741275 datasetOptions.clear ();
12751276 layerOptions.clear ();
@@ -1281,15 +1282,77 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
12811282 , true // Default value
12821283 ) );
12831284
1284- // Will be handled with the SpatiaLite driver alias
1285- #if 0
1286- datasetOptions.insert( "SPATIALITE", new BoolOption(
1287- QObject::tr( "Create the SpatiaLite flavour of the metadata tables, which are a bit "
1288- "differ from the metadata used by this OGR driver and from OGC "
1289- "specifications. Implies METADATA=yes" )
1285+ // Will handle the spatialite alias
1286+ datasetOptions.insert ( " SPATIALITE" , new HiddenOption (
1287+ " NO"
1288+ ) );
1289+
1290+
1291+ datasetOptions.insert ( " INIT_WITH_EPSG" , new HiddenOption (
1292+ " NO"
1293+ ) );
1294+
1295+ layerOptions.insert ( " FORMAT" , new HiddenOption (
1296+ " WKT"
1297+ ) );
1298+
1299+ layerOptions.insert ( " LAUNDER" , new BoolOption (
1300+ QObject::tr ( " Controls whether layer and field names will be laundered for easier use "
1301+ " in SQLite. Laundered names will be convered to lower case and some special "
1302+ " characters(' - #) will be changed to underscores." )
12901303 , true // Default value
12911304 ) );
1292- #endif
1305+
1306+ layerOptions.insert ( " SPATIAL_INDEX" , new HiddenOption (
1307+ " NO"
1308+ ) );
1309+
1310+ layerOptions.insert ( " COMPRESS_GEOM" , new HiddenOption (
1311+ " NO"
1312+ ) );
1313+
1314+ layerOptions.insert ( " SRID" , new HiddenOption (
1315+ " "
1316+ ) );
1317+
1318+ layerOptions.insert ( " COMPRESS_COLUMNS" , new StringOption (
1319+ QObject::tr ( " column_name1[,column_name2, ...] A list of (String) columns that "
1320+ " must be compressed with ZLib DEFLATE algorithm. This might be beneficial "
1321+ " for databases that have big string blobs. However, use with care, since "
1322+ " the value of such columns will be seen as compressed binary content with "
1323+ " other SQLite utilities (or previous OGR versions). With OGR, when inserting, "
1324+ " modifying or queryings compressed columns, compression/decompression is "
1325+ " done transparently. However, such columns cannot be (easily) queried with "
1326+ " an attribute filter or WHERE clause. Note: in table definition, such columns "
1327+ " have the 'VARCHAR_deflate' declaration type." )
1328+ , " " // Default value
1329+ ) );
1330+
1331+ driverMetadata.insert ( " SQLite" ,
1332+ MetaData (
1333+ " SQLite" ,
1334+ QObject::tr ( " SQLite" ),
1335+ " *.sqlite" ,
1336+ " sqlite" ,
1337+ datasetOptions,
1338+ layerOptions
1339+ )
1340+ );
1341+ // SpatiaLite
1342+
1343+ datasetOptions.clear ();
1344+ layerOptions.clear ();
1345+
1346+ datasetOptions.insert ( " METADATA" , new BoolOption (
1347+ QObject::tr ( " Can be used to avoid creating the geometry_columns and spatial_ref_sys "
1348+ " tables in a new database. By default these metadata tables are created "
1349+ " when a new database is created." )
1350+ , true // Default value
1351+ ) );
1352+
1353+ datasetOptions.insert ( " SPATIALITE" , new HiddenOption (
1354+ " YES"
1355+ ) );
12931356
12941357 datasetOptions.insert ( " INIT_WITH_EPSG" , new BoolOption (
12951358 QObject::tr ( " Insert the content of the EPSG CSV files into the spatial_ref_sys table. "
@@ -1356,17 +1419,6 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
13561419 , " " // Default value
13571420 ) );
13581421
1359- driverMetadata.insert ( " SQLite" ,
1360- MetaData (
1361- " SQLite" ,
1362- QObject::tr ( " SQLite" ),
1363- " *.sqlite" ,
1364- " sqlite" ,
1365- datasetOptions,
1366- layerOptions
1367- )
1368- );
1369-
13701422 driverMetadata.insert ( " SpatiaLite" ,
13711423 MetaData (
13721424 " SpatiaLite" ,
0 commit comments