mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
Discard fid columns when exporting features for geopdf documents
Otherwise we run into issues with duplicate fids or incompatible fid field types due to the geopackage format used as a temporary store of the rendered features. Fixes failure to create GeoPDF documents in some circumstances.
This commit is contained in:
parent
fdb9b97f4e
commit
3610620fe7
@ -162,7 +162,7 @@ bool QgsAbstractGeoPdfExporter::saveTemporaryLayers()
|
||||
// write out features to disk
|
||||
const QgsFeatureList features = it.value();
|
||||
QString layerName;
|
||||
QgsVectorFileWriter writer( filePath, QString(), features.first().fields(), features.first().geometry().wkbType(), QgsCoordinateReferenceSystem(), QStringLiteral( "GPKG" ), QStringList(), QStringList(), nullptr, QgsVectorFileWriter::NoSymbology, nullptr, &layerName );
|
||||
QgsVectorFileWriter writer( filePath, QString(), features.first().fields(), features.first().geometry().wkbType(), QgsCoordinateReferenceSystem(), QStringLiteral( "GPKG" ), QStringList(), QStringList(), nullptr, QgsVectorFileWriter::NoSymbology, QgsFeatureSink::RegeneratePrimaryKey, &layerName );
|
||||
if ( writer.hasError() )
|
||||
{
|
||||
mErrorMessage = writer.errorMessage();
|
||||
|
Loading…
x
Reference in New Issue
Block a user