Skip to content

Commit

Permalink
Add FlatGeobuf as an exportable format
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornharrtell authored and nyalldawson committed Nov 20, 2019
1 parent 69ba08e commit 315c9bb
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/core/qgsvectorfilewriter.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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" ) )
Expand Down Expand Up @@ -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" ) )
Expand Down Expand Up @@ -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" ) )
Expand Down

0 comments on commit 315c9bb

Please sign in to comment.