QGIS API Documentation  3.2.0-Bonn (bc43194)
Public Member Functions | Public Attributes | List of all members
QgsVectorFileWriter::SaveVectorOptions Class Reference

Options to pass to writeAsVectorFormat() More...

#include <qgsvectorfilewriter.h>

Public Member Functions

 SaveVectorOptions ()
 Constructor. More...
 
virtual ~SaveVectorOptions ()=default
 

Public Attributes

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

Detailed Description

Options to pass to writeAsVectorFormat()

Since
QGIS 3.0

Definition at line 372 of file qgsvectorfilewriter.h.

Constructor & Destructor Documentation

◆ SaveVectorOptions()

QgsVectorFileWriter::SaveVectorOptions::SaveVectorOptions ( )

Constructor.

Definition at line 2399 of file qgsvectorfilewriter.cpp.

◆ ~SaveVectorOptions()

virtual QgsVectorFileWriter::SaveVectorOptions::~SaveVectorOptions ( )
virtualdefault

Member Data Documentation

◆ actionOnExistingFile

QgsVectorFileWriter::ActionOnExistingFile QgsVectorFileWriter::SaveVectorOptions::actionOnExistingFile = CreateOrOverwriteFile

Action on existing file.

Definition at line 387 of file qgsvectorfilewriter.h.

◆ attributes

QgsAttributeList QgsVectorFileWriter::SaveVectorOptions::attributes

Attributes to export (empty means all unless skipAttributeCreation is set)

Definition at line 410 of file qgsvectorfilewriter.h.

◆ ct

QgsCoordinateTransform QgsVectorFileWriter::SaveVectorOptions::ct

Transform to reproject exported geometries with, or invalid transform for no transformation.

Definition at line 395 of file qgsvectorfilewriter.h.

◆ datasourceOptions

QStringList QgsVectorFileWriter::SaveVectorOptions::datasourceOptions

List of OGR data source creation options.

Definition at line 401 of file qgsvectorfilewriter.h.

◆ driverName

QString QgsVectorFileWriter::SaveVectorOptions::driverName

OGR driver to use.

Definition at line 381 of file qgsvectorfilewriter.h.

◆ feedback

QgsFeedback* QgsVectorFileWriter::SaveVectorOptions::feedback = nullptr

Optional feedback object allowing cancelation of layer save.

Definition at line 441 of file qgsvectorfilewriter.h.

◆ fieldValueConverter

QgsVectorFileWriter::FieldValueConverter* QgsVectorFileWriter::SaveVectorOptions::fieldValueConverter = nullptr

Field value converter.

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

Definition at line 438 of file qgsvectorfilewriter.h.

◆ fileEncoding

QString QgsVectorFileWriter::SaveVectorOptions::fileEncoding

Encoding to use.

Definition at line 390 of file qgsvectorfilewriter.h.

◆ filterExtent

QgsRectangle QgsVectorFileWriter::SaveVectorOptions::filterExtent

If not empty, only features intersecting the extent will be saved.

Definition at line 419 of file qgsvectorfilewriter.h.

◆ forceMulti

bool QgsVectorFileWriter::SaveVectorOptions::forceMulti = false

Sets to true to force creation of multi* geometries.

Definition at line 427 of file qgsvectorfilewriter.h.

◆ includeZ

bool QgsVectorFileWriter::SaveVectorOptions::includeZ = false

Sets to true to include z dimension in output. This option is only valid if overrideGeometryType is set.

Definition at line 430 of file qgsvectorfilewriter.h.

◆ layerName

QString QgsVectorFileWriter::SaveVectorOptions::layerName

Layer name. If let empty, it will be derived from the filename.

Definition at line 384 of file qgsvectorfilewriter.h.

◆ layerOptions

QStringList QgsVectorFileWriter::SaveVectorOptions::layerOptions

List of OGR layer creation options.

Definition at line 404 of file qgsvectorfilewriter.h.

◆ onlySelectedFeatures

bool QgsVectorFileWriter::SaveVectorOptions::onlySelectedFeatures = false

Write only selected features of layer.

Definition at line 398 of file qgsvectorfilewriter.h.

◆ overrideGeometryType

QgsWkbTypes::Type QgsVectorFileWriter::SaveVectorOptions::overrideGeometryType = QgsWkbTypes::Unknown

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

Definition at line 424 of file qgsvectorfilewriter.h.

◆ skipAttributeCreation

bool QgsVectorFileWriter::SaveVectorOptions::skipAttributeCreation = false

Only write geometries.

Definition at line 407 of file qgsvectorfilewriter.h.

◆ symbologyExport

QgsVectorFileWriter::SymbologyExport QgsVectorFileWriter::SaveVectorOptions::symbologyExport = NoSymbology

Symbology to export.

Definition at line 413 of file qgsvectorfilewriter.h.

◆ symbologyScale

double QgsVectorFileWriter::SaveVectorOptions::symbologyScale = 1.0

Scale of symbology.

Definition at line 416 of file qgsvectorfilewriter.h.


The documentation for this class was generated from the following files: