Add FlatGeobuf as an exportable format

This commit is contained in:
Björn Harrtell 2019-11-19 00:26:06 +01:00 committed by Nyall Dawson
parent 69ba08eae9
commit 315c9bbea6

View File

@ -962,6 +962,21 @@ class QgsVectorFileWriterMetadataContainer
)
);
// FlatGeobuf
datasetOptions.clear();
layerOptions.clear();
driverMetadata.insert( QStringLiteral( "FlatGeobuf" ),
QgsVectorFileWriter::MetaData(
QStringLiteral( "FlatGeobuf" ),
QObject::tr( "FlatGeobuf" ),
QStringLiteral( "*.fgb" ),
QStringLiteral( "fgb" ),
datasetOptions,
layerOptions
)
);
// ESRI Shapefile
datasetOptions.clear();
layerOptions.clear();
@ -3172,6 +3187,10 @@ QList< QgsVectorFileWriter::FilterFormatDetails > QgsVectorFileWriter::supported
return true; // Make https://twitter.com/shapefiIe a sad little fellow
else if ( b.driverName == QLatin1String( "GPKG" ) )
return false;
else if ( a.driverName == QLatin1String( "FlatGeobuf" ) )
return true;
else if ( b.driverName == QLatin1String( "FlatGeobuf" ) )
return false;
else if ( a.driverName == QLatin1String( "ESRI Shapefile" ) )
return true;
else if ( b.driverName == QLatin1String( "ESRI Shapefile" ) )
@ -3214,6 +3233,10 @@ QStringList QgsVectorFileWriter::supportedFormatExtensions( const VectorFormatOp
return true; // Make https://twitter.com/shapefiIe a sad little fellow
else if ( b == QLatin1String( "gpkg" ) )
return false;
else if ( a == QLatin1String( "fgb" ) )
return true;
else if ( b == QLatin1String( "fgb" ) )
return false;
else if ( a == QLatin1String( "shp" ) )
return true;
else if ( b == QLatin1String( "shp" ) )
@ -3309,6 +3332,10 @@ QList< QgsVectorFileWriter::DriverDetails > QgsVectorFileWriter::ogrDriverList(
return true; // Make https://twitter.com/shapefiIe a sad little fellow
else if ( b.driverName == QLatin1String( "GPKG" ) )
return false;
else if ( a.driverName == QLatin1String( "FlatGeobuf" ) )
return true;
else if ( b.driverName == QLatin1String( "FlatGeobuf" ) )
return false;
else if ( a.driverName == QLatin1String( "ESRI Shapefile" ) )
return true;
else if ( b.driverName == QLatin1String( "ESRI Shapefile" ) )