QgsVectorFileWriter::SaveVectorOptions class

Options to pass to writeAsVectorFormat()

Constructors, destructors, conversion operators

SaveVectorOptions()
Constructor.

Public variables

QgsVectorFileWriter::ActionOnExistingFile actionOnExistingFile
Action on existing file.
QgsAttributeList attributes
Attributes to export (empty means all unless skipAttributeCreation is set)
QgsCoordinateTransform ct
Transform to reproject exported geometries with, or invalid transform for no transformation.
QStringList datasourceOptions
List of OGR data source creation options.
QString driverName
OGR driver to use.
QgsFeedback* feedback
Optional feedback object allowing cancelation of layer save.
QgsVectorFileWriter::FieldValueConverter* fieldValueConverter
Field value converter.
QString fileEncoding
Encoding to use.
QgsRectangle filterExtent
If not empty, only features intersecting the extent will be saved.
bool forceMulti
Sets to true to force creation of multi* geometries.
bool includeZ
Sets to true to include z dimension in output. This option is only valid if overrideGeometryType is set.
QString layerName
Layer name. If let empty, it will be derived from the filename.
QStringList layerOptions
List of OGR layer creation options.
bool onlySelectedFeatures
Write only selected features of layer.
QgsWkbTypes::Type overrideGeometryType
Set to a valid geometry type to override the default geometry type for the layer.
bool skipAttributeCreation
Only write geometries.
QgsVectorFileWriter::SymbologyExport symbologyExport
Symbology to export.
double symbologyScale
Scale of symbology.

Variable documentation

QgsVectorFileWriter::FieldValueConverter* QgsVectorFileWriter::SaveVectorOptions::fieldValueConverter

Field value converter.

Ownership is not transferred and callers must ensure that the lifetime of fieldValueConverter exceeds the lifetime of the QgsVectorFileWriter object.

QgsWkbTypes::Type QgsVectorFileWriter::SaveVectorOptions::overrideGeometryType

Set to a valid geometry type to override the default geometry type for the layer.

This parameter allows for conversion of geometryless tables to null geometries, etc