QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
Options to pass to writeAsVectorFormat() More...
#include <qgsvectorfilewriter.h>
Public Member Functions | |
SaveVectorOptions () | |
virtual | ~SaveVectorOptions ()=default |
Public Attributes | |
QgsVectorFileWriter::ActionOnExistingFile | actionOnExistingFile = CreateOrOverwriteFile |
Action on existing file. | |
QgsAttributeList | attributes |
Attributes to export (empty means all unless skipAttributeCreation is set) | |
QStringList | attributesExportNames |
Attributes export names. | |
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 = nullptr |
Optional feedback object allowing cancellation of layer save. | |
FieldNameSource | fieldNameSource = Original |
Source for exported field names. | |
QgsVectorFileWriter::FieldValueConverter * | fieldValueConverter = nullptr |
Field value converter. | |
QString | fileEncoding |
Encoding to use. | |
QgsRectangle | filterExtent |
If not empty, only features intersecting the extent will be saved. | |
bool | forceMulti = false |
Sets to true to force creation of multi* geometries. | |
bool | includeConstraints = false |
Set to true to transfer field constraints to the exported vector file. | |
bool | includeZ = false |
Sets to true to include z dimension in output. This option is only valid if overrideGeometryType is set. | |
QgsLayerMetadata | layerMetadata |
Layer metadata to save for the exported vector file. | |
QString | layerName |
Layer name. If let empty, it will be derived from the filename. | |
QStringList | layerOptions |
List of OGR layer creation options. | |
bool | onlySelectedFeatures = false |
Write only selected features of layer. | |
Qgis::WkbType | overrideGeometryType = Qgis::WkbType::Unknown |
Set to a valid geometry type to override the default geometry type for the layer. | |
bool | saveMetadata = false |
Set to true to save layer metadata for the exported vector file. | |
bool | setFieldDomains = true |
Set to true to transfer field domains to the exported vector file. | |
bool | skipAttributeCreation = false |
Only write geometries. | |
const QgsAbstractDatabaseProviderConnection * | sourceDatabaseProviderConnection = nullptr |
Source database provider connection, for field domains. | |
Qgis::FeatureSymbologyExport | symbologyExport = Qgis::FeatureSymbologyExport::NoSymbology |
Symbology to export. | |
double | symbologyScale = 1.0 |
Scale of symbology. | |
Options to pass to writeAsVectorFormat()
Definition at line 444 of file qgsvectorfilewriter.h.
QgsVectorFileWriter::SaveVectorOptions::SaveVectorOptions | ( | ) |
Definition at line 3312 of file qgsvectorfilewriter.cpp.
|
virtualdefault |
QgsVectorFileWriter::ActionOnExistingFile QgsVectorFileWriter::SaveVectorOptions::actionOnExistingFile = CreateOrOverwriteFile |
Action on existing file.
Definition at line 459 of file qgsvectorfilewriter.h.
QgsAttributeList QgsVectorFileWriter::SaveVectorOptions::attributes |
Attributes to export (empty means all unless skipAttributeCreation is set)
Definition at line 483 of file qgsvectorfilewriter.h.
QStringList QgsVectorFileWriter::SaveVectorOptions::attributesExportNames |
Attributes export names.
Definition at line 486 of file qgsvectorfilewriter.h.
QgsCoordinateTransform QgsVectorFileWriter::SaveVectorOptions::ct |
Transform to reproject exported geometries with, or invalid transform for no transformation.
Definition at line 468 of file qgsvectorfilewriter.h.
QStringList QgsVectorFileWriter::SaveVectorOptions::datasourceOptions |
List of OGR data source creation options.
Definition at line 474 of file qgsvectorfilewriter.h.
QString QgsVectorFileWriter::SaveVectorOptions::driverName |
OGR driver to use.
Definition at line 453 of file qgsvectorfilewriter.h.
QgsFeedback* QgsVectorFileWriter::SaveVectorOptions::feedback = nullptr |
Optional feedback object allowing cancellation of layer save.
Definition at line 518 of file qgsvectorfilewriter.h.
FieldNameSource QgsVectorFileWriter::SaveVectorOptions::fieldNameSource = Original |
Source for exported field names.
Definition at line 525 of file qgsvectorfilewriter.h.
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 515 of file qgsvectorfilewriter.h.
QString QgsVectorFileWriter::SaveVectorOptions::fileEncoding |
Encoding to use.
Definition at line 462 of file qgsvectorfilewriter.h.
QgsRectangle QgsVectorFileWriter::SaveVectorOptions::filterExtent |
If not empty, only features intersecting the extent will be saved.
Definition at line 495 of file qgsvectorfilewriter.h.
bool QgsVectorFileWriter::SaveVectorOptions::forceMulti = false |
Sets to true
to force creation of multi* geometries.
Definition at line 504 of file qgsvectorfilewriter.h.
bool QgsVectorFileWriter::SaveVectorOptions::includeConstraints = false |
Set to true
to transfer field constraints to the exported vector file.
Support for field constraints depends on the output file format.
Definition at line 550 of file qgsvectorfilewriter.h.
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 507 of file qgsvectorfilewriter.h.
QgsLayerMetadata QgsVectorFileWriter::SaveVectorOptions::layerMetadata |
Layer metadata to save for the exported vector file.
This will only be used if saveMetadata is true
.
Definition at line 541 of file qgsvectorfilewriter.h.
QString QgsVectorFileWriter::SaveVectorOptions::layerName |
Layer name. If let empty, it will be derived from the filename.
Definition at line 456 of file qgsvectorfilewriter.h.
QStringList QgsVectorFileWriter::SaveVectorOptions::layerOptions |
List of OGR layer creation options.
Definition at line 477 of file qgsvectorfilewriter.h.
bool QgsVectorFileWriter::SaveVectorOptions::onlySelectedFeatures = false |
Write only selected features of layer.
Definition at line 471 of file qgsvectorfilewriter.h.
Qgis::WkbType QgsVectorFileWriter::SaveVectorOptions::overrideGeometryType = Qgis::WkbType::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 501 of file qgsvectorfilewriter.h.
bool QgsVectorFileWriter::SaveVectorOptions::saveMetadata = false |
Set to true
to save layer metadata for the exported vector file.
Definition at line 533 of file qgsvectorfilewriter.h.
bool QgsVectorFileWriter::SaveVectorOptions::setFieldDomains = true |
Set to true
to transfer field domains to the exported vector file.
Support for field domains depends on the output file format.
Definition at line 560 of file qgsvectorfilewriter.h.
bool QgsVectorFileWriter::SaveVectorOptions::skipAttributeCreation = false |
Only write geometries.
Definition at line 480 of file qgsvectorfilewriter.h.
const QgsAbstractDatabaseProviderConnection* QgsVectorFileWriter::SaveVectorOptions::sourceDatabaseProviderConnection = nullptr |
Source database provider connection, for field domains.
Ownership is not transferred and callers must ensure that the lifetime of sourceDatabaseProviderConnection exceeds the lifetime of the QgsVectorFileWriter object.
Definition at line 570 of file qgsvectorfilewriter.h.
Qgis::FeatureSymbologyExport QgsVectorFileWriter::SaveVectorOptions::symbologyExport = Qgis::FeatureSymbologyExport::NoSymbology |
Symbology to export.
Definition at line 489 of file qgsvectorfilewriter.h.
double QgsVectorFileWriter::SaveVectorOptions::symbologyScale = 1.0 |
Scale of symbology.
Definition at line 492 of file qgsvectorfilewriter.h.