19 #ifndef QGSVECTORFILEWRITER_H 20 #define QGSVECTORFILEWRITER_H 56 : docString( docString )
71 , values( values.toSet() )
72 , defaultValue( defaultValue )
73 , allowNone( allowNone )
87 :
Option( docString, String )
88 , defaultValue( defaultValue )
100 :
Option( docString, Int )
101 , defaultValue( defaultValue )
136 : longName( longName )
137 , trLongName( trLongName )
140 , driverOptions( driverOptions )
141 , layerOptions( layerOptions )
142 , compulsoryEncoding( compulsoryEncoding )
207 CanAddNewLayer = 1 << 0,
210 CanAppendToExistingLayer = 1 << 1,
213 CanAddNewFieldsToExistingLayer = 1 << 2,
216 CanDeleteLayer = 1 << 3
238 AppendToLayerAddFields
267 const QString& driverName =
"ESRI Shapefile",
268 bool onlySelected =
false,
269 QString *errorMessage =
nullptr,
272 bool skipAttributeCreation =
false,
273 QString *newFilename =
nullptr,
275 double symbologyScale = 1.0,
278 bool forceMulti =
false,
279 bool includeZ =
false,
311 const QString& driverName =
"ESRI Shapefile",
312 bool onlySelected =
false,
313 QString *errorMessage =
nullptr,
316 bool skipAttributeCreation =
false,
317 QString *newFilename =
nullptr,
319 double symbologyScale = 1.0,
322 bool forceMulti =
false,
323 bool includeZ =
false,
407 QString *newFilename =
nullptr,
408 QString *errorMessage =
nullptr );
416 const QString& driverName =
"ESRI Shapefile",
419 QString *newFilename =
nullptr,
429 const QString& driverName =
"ESRI Shapefile",
432 QString *newFilename =
nullptr,
464 ActionOnExistingFile action
477 static QString fileFilterString();
483 static QString convertCodecNameForEncodingOption(
const QString &codecName );
504 static bool deleteShapeFile(
const QString& theFileName );
510 void setSymbologyScaleDenominator(
double d );
512 static bool driverMetadata(
const QString& driverName,
MetaData& driverMetadata );
526 static EditionCapabilities editionCapabilities(
const QString& datasetName );
532 static bool targetLayerExists(
const QString& datasetName,
539 static bool areThereNewFieldsToCreate(
const QString& datasetName,
568 #if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM >= 1700 589 ActionOnExistingFile action );
596 OGRFeatureH createFeature(
QgsFeature& feature );
597 bool writeFeature( OGRLayerH layer, OGRFeatureH feature );
615 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsVectorFileWriter::EditionCapabilities )
Append features to existing layer, but do not create new fields.
Wrapper for iterator of features from vector data provider or vector layer.
BoolOption(const QString &docString, bool defaultValue)
A rectangle specified with double values.
OutputUnit
The unit of the output.
QMap< int, int > attrIdxToOgrIdx()
SymbologyExport symbologyExport
Symbology to export.
WriterError mError
Contains error value if construction was not successful.
bool forceMulti
Set to true to force creation of multi* geometries.
SymbologyExport mSymbologyExport
double mSymbologyScaleDenominator
Scale for symbology export (e.g.
QgsAttributeList attributes
Attributes to export (empty means all unless skipAttributeCreation is set)
double symbologyScaleDenominator() const
Container of fields for a vector layer.
WkbType
Used for symbology operations.
StringOption(const QString &docString, const QString &defaultValue=QString())
QStringList layerOptions
List of OGR layer creation options.
A convenience class for writing vector files to disk.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Create or overwrite file.
bool onlySelectedFeatures
Write only selected features of layer.
IntOption(const QString &docString, int defaultValue)
Options to pass to writeAsVectorFormat()
const QgsCoordinateTransform * ct
Transform to reproject exported geometries with, or invalid transform for no transformation.
QStringList datasourceOptions
List of OGR data source creation options.
SetOption(const QString &docString, const QStringList &values, const QString &defaultValue, bool allowNone=false)
QgsWKBTypes::Type mWkbType
Geometry type which is being used.
FieldValueConverter * mFieldValueConverter
Field value converter.
QList< int > QgsAttributeList
Create or overwrite layer.
ActionOnExistingFile
Combination of CanAddNewLayer, CanAppendToExistingLayer, CanAddNewFieldsToExistingLayer or CanDeleteL...
QString driverName
OGR driver to use.
Encapsulate a field in an attribute table or data source.
FieldValueConverter * fieldValueConverter
Field value converter.
QMap< int, int > mAttrIdxToOgrIdx
Map attribute indizes to OGR field indexes.
QgsRectangle filterExtent
If not empty, only features intersecting the extent will be saved.
OGRSpatialReferenceH mOgrRef
QgsWKBTypes::Type overrideGeometryType
Set to a valid geometry type to override the default geometry type for the layer. ...
void setSymbologyExport(SymbologyExport symExport)
Contains information about the context of a rendering operation.
QString fileEncoding
Encoding to use.
HiddenOption(const QString &value)
bool skipAttributeCreation
Only write geometries.
double symbologyScale
Scale of symbology.
EditionCapability
Edition capability flags.
Class for storing a coordinate reference system (CRS)
Option(const QString &docString, OptionType type)
ActionOnExistingFile actionOnExistingFile
Action on existing file.
UnitType
Map units that qgis supports.
Interface to convert raw field values to their user-friendly value.
bool includeZ
Set to true to include z dimension in output.
QString layerName
Layer name.
SymbologyExport symbologyExport() const
Represents a vector layer which manages a vector based data sets.
void * OGRSpatialReferenceH