QGIS API Documentation  3.17.0-Master (8af46bc54f)
qgsvectorfilewriter.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectorfilewriter.h
3  generic vector file writer
4  -------------------
5  begin : Jun 6 2004
6  copyright : (C) 2004 by Tim Sutton
7  email : tim at linfiniti.com
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 #ifndef QGSVECTORFILEWRITER_H
20 #define QGSVECTORFILEWRITER_H
21 
22 #include "qgis_core.h"
23 #include "qgis_sip.h"
24 #include "qgsfields.h"
25 #include "qgsfeedback.h"
26 #include "qgssymbol.h"
27 #include "qgstaskmanager.h"
28 #include "qgsogrutils.h"
29 #include "qgsrenderer.h"
30 #include "qgsgeometryengine.h"
31 #include "qgsfeaturesink.h"
32 #include <ogr_api.h>
33 
34 class QgsSymbolLayer;
35 class QTextCodec;
36 class QgsFeatureIterator;
37 
45 class CORE_EXPORT QgsVectorFileWriter : public QgsFeatureSink
46 {
47  public:
49  {
50  Set,
52  Int,
53  Hidden
54  };
55 
59  class Option
60  {
61  public:
62  Option( const QString &docString, QgsVectorFileWriter::OptionType type )
63  : docString( docString )
64  , type( type ) {}
65  virtual ~Option() = default;
66 
67  QString docString;
69  };
70 
75  {
76  public:
77  SetOption( const QString &docString, const QStringList &values, const QString &defaultValue, bool allowNone = false )
78  : Option( docString, Set )
79  , values( qgis::listToSet( values ) )
80  , defaultValue( defaultValue )
81  , allowNone( allowNone )
82  {}
83 
84  QSet<QString> values;
85  QString defaultValue;
86  bool allowNone;
87  };
88 
93  {
94  public:
95  StringOption( const QString &docString, const QString &defaultValue = QString() )
96  : Option( docString, String )
97  , defaultValue( defaultValue )
98  {}
99 
100  QString defaultValue;
101  };
102 
107  {
108  public:
109  IntOption( const QString &docString, int defaultValue )
110  : Option( docString, Int )
111  , defaultValue( defaultValue )
112  {}
113 
115  };
116 
121  {
122  public:
123  BoolOption( const QString &docString, bool defaultValue )
124  : SetOption( docString, QStringList() << QStringLiteral( "YES" ) << QStringLiteral( "NO" ), defaultValue ? "YES" : "NO" )
125  {}
126  };
127 
132  {
133  public:
134  explicit HiddenOption( const QString &value )
135  : Option( QString(), Hidden )
136  , mValue( value )
137  {}
138 
139  QString mValue;
140  };
141 
142  struct MetaData
143  {
145  MetaData() = default;
146 
147  MetaData( const QString &longName, const QString &trLongName, const QString &glob, const QString &ext, const QMap<QString, QgsVectorFileWriter::Option *> &driverOptions, const QMap<QString, QgsVectorFileWriter::Option *> &layerOptions, const QString &compulsoryEncoding = QString() )
148  : longName( longName )
149  , trLongName( trLongName )
150  , glob( glob )
151  , ext( ext )
152  , driverOptions( driverOptions )
153  , layerOptions( layerOptions )
154  , compulsoryEncoding( compulsoryEncoding )
155  {}
156 
157  QString longName;
158  QString trLongName;
159  QString glob;
160  QString ext;
161  QMap<QString, QgsVectorFileWriter::Option *> driverOptions;
162  QMap<QString, QgsVectorFileWriter::Option *> layerOptions;
165  };
166 
168  {
169  NoError = 0,
179  };
180 
182  {
183  NoSymbology = 0, //export only data
184  FeatureSymbology, //Keeps the number of features and export symbology per feature
185  SymbolLayerSymbology //Exports one feature per symbol layer (considering symbol levels)
186  };
187 
188 
194  {
195  SortRecommended = 1 << 1,
196  SkipNonSpatialFormats = 1 << 2,
197  };
198  Q_DECLARE_FLAGS( VectorFormatOptions, VectorFormatOption )
199 
200 
205  class CORE_EXPORT FieldValueConverter
206  {
207  public:
209  FieldValueConverter() = default;
210 
211  virtual ~FieldValueConverter() = default;
212 
218  virtual QgsField fieldDefinition( const QgsField &field );
219 
226  virtual QVariant convert( int fieldIdxInLayer, const QVariant &value );
227 
232  };
233 
239  {
241  CanAddNewLayer = 1 << 0,
242 
244  CanAppendToExistingLayer = 1 << 1,
245 
247  CanAddNewFieldsToExistingLayer = 1 << 2,
248 
250  CanDeleteLayer = 1 << 3
251  };
252 
257  Q_DECLARE_FLAGS( EditionCapabilities, EditionCapability )
258 
259 
264  {
267 
270 
273 
275  AppendToLayerAddFields
276  };
277 
278 #ifndef SIP_RUN
279 
305 #else
306 
331 #endif
332  Q_DECL_DEPRECATED static QgsVectorFileWriter::WriterError writeAsVectorFormat( QgsVectorLayer *layer,
333  const QString &fileName,
334  const QString &fileEncoding,
336  const QString &driverName = "GPKG",
337  bool onlySelected = false,
338  QString *errorMessage SIP_OUT = nullptr,
339  const QStringList &datasourceOptions = QStringList(),
340  const QStringList &layerOptions = QStringList(),
341  bool skipAttributeCreation = false,
342  QString *newFilename = nullptr,
344  double symbologyScale = 1.0,
345  const QgsRectangle *filterExtent = nullptr,
346  QgsWkbTypes::Type overrideGeometryType = QgsWkbTypes::Unknown,
347  bool forceMulti = false,
348  bool includeZ = false,
349  const QgsAttributeList &attributes = QgsAttributeList(),
350  QgsVectorFileWriter::FieldValueConverter *fieldValueConverter = nullptr
351 #ifndef SIP_RUN
352  , QString *newLayer = nullptr );
353 #else
354  ) SIP_DEPRECATED;
355 #endif
356 
357 #ifndef SIP_RUN
358 
386 #else
387 
414 #endif
415  Q_DECL_DEPRECATED static QgsVectorFileWriter::WriterError writeAsVectorFormat( QgsVectorLayer *layer,
416  const QString &fileName,
417  const QString &fileEncoding,
418  const QgsCoordinateTransform &ct,
419  const QString &driverName = "GPKG",
420  bool onlySelected = false,
421  QString *errorMessage SIP_OUT = nullptr,
422  const QStringList &datasourceOptions = QStringList(),
423  const QStringList &layerOptions = QStringList(),
424  bool skipAttributeCreation = false,
425  QString *newFilename = nullptr,
427  double symbologyScale = 1.0,
428  const QgsRectangle *filterExtent = nullptr,
429  QgsWkbTypes::Type overrideGeometryType = QgsWkbTypes::Unknown,
430  bool forceMulti = false,
431  bool includeZ = false,
432  const QgsAttributeList &attributes = QgsAttributeList(),
433  QgsVectorFileWriter::FieldValueConverter *fieldValueConverter = nullptr
434 #ifndef SIP_RUN
435  , QString *newLayer = nullptr );
436 #else
437  ) SIP_DEPRECATED;
438 #endif
439 
445  class CORE_EXPORT SaveVectorOptions
446  {
447  public:
450 
451  virtual ~SaveVectorOptions() = default;
452 
454  QString driverName;
455 
457  QString layerName;
458 
460  QgsVectorFileWriter::ActionOnExistingFile actionOnExistingFile = CreateOrOverwriteFile;
461 
463  QString fileEncoding;
464 
470 
472  bool onlySelectedFeatures = false;
473 
475  QStringList datasourceOptions;
476 
478  QStringList layerOptions;
479 
481  bool skipAttributeCreation = false;
482 
485 
487  QgsVectorFileWriter::SymbologyExport symbologyExport = NoSymbology;
488 
490  double symbologyScale = 1.0;
491 
494 
499  QgsWkbTypes::Type overrideGeometryType = QgsWkbTypes::Unknown;
500 
502  bool forceMulti = false;
503 
505  bool includeZ = false;
506 
513  QgsVectorFileWriter::FieldValueConverter *fieldValueConverter = nullptr;
514 
516  QgsFeedback *feedback = nullptr;
517  };
518 
519 #ifndef SIP_RUN
520 
532 #else
533 
544 #endif
545  Q_DECL_DEPRECATED static QgsVectorFileWriter::WriterError writeAsVectorFormat( QgsVectorLayer *layer,
546  const QString &fileName,
548  QString *newFilename = nullptr,
549  QString *errorMessage SIP_OUT = nullptr
550 #ifndef SIP_RUN
551  , QString *newLayer = nullptr );
552 #else
553  ) SIP_DEPRECATED;
554 #endif
555 
560  Q_DECL_DEPRECATED QgsVectorFileWriter( const QString &vectorFileName,
561  const QString &fileEncoding,
562  const QgsFields &fields,
563  QgsWkbTypes::Type geometryType,
565  const QString &driverName = "GPKG",
566  const QStringList &datasourceOptions = QStringList(),
567  const QStringList &layerOptions = QStringList(),
568  QString *newFilename = nullptr,
570  QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags()
571 #ifndef SIP_RUN
572  , QString *newLayer = nullptr,
574 #endif
575  ) SIP_DEPRECATED;
576 
598  Q_DECL_DEPRECATED QgsVectorFileWriter( const QString &vectorFileName,
599  const QString &fileEncoding,
600  const QgsFields &fields,
601  QgsWkbTypes::Type geometryType,
602  const QgsCoordinateReferenceSystem &srs,
603  const QString &driverName,
604  const QStringList &datasourceOptions,
605  const QStringList &layerOptions,
606  QString *newFilename,
607  QgsVectorFileWriter::SymbologyExport symbologyExport,
608  QgsVectorFileWriter::FieldValueConverter *fieldValueConverter,
609  const QString &layerName,
611  QString *newLayer = nullptr,
613  QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags()
614  ) SIP_SKIP;
615 
617  QgsVectorFileWriter( const QgsVectorFileWriter &rh ) = delete;
619  QgsVectorFileWriter &operator=( const QgsVectorFileWriter &rh ) = delete;
620 
634  static QgsVectorFileWriter *create( const QString &fileName,
635  const QgsFields &fields,
636  QgsWkbTypes::Type geometryType,
637  const QgsCoordinateReferenceSystem &srs,
638  const QgsCoordinateTransformContext &transformContext,
639  const QgsVectorFileWriter::SaveVectorOptions &options,
640  QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags(),
641  QString *newFilename = nullptr,
642  QString *newLayer = nullptr ) SIP_FACTORY;
643 
656  static QgsVectorFileWriter::WriterError writeAsVectorFormatV2( QgsVectorLayer *layer,
657  const QString &fileName,
658  const QgsCoordinateTransformContext &transformContext,
659  const QgsVectorFileWriter::SaveVectorOptions &options,
660  QString *newFilename = nullptr,
661  QString *newLayer = nullptr,
662  QString *errorMessage SIP_OUT = nullptr );
663 
669  {
671  QString driverName;
672 
674  QString filterString;
675 
680  QStringList globs;
681  };
682 
691  static QList< QgsVectorFileWriter::FilterFormatDetails > supportedFiltersAndFormats( VectorFormatOptions options = SortRecommended );
692 
702  static QStringList supportedFormatExtensions( VectorFormatOptions options = SortRecommended );
703 
711  static bool supportsFeatureStyles( const QString &driverName );
712 
718  {
720  QString longName;
721 
723  QString driverName;
724  };
725 
737  static QList< QgsVectorFileWriter::DriverDetails > ogrDriverList( VectorFormatOptions options = SortRecommended );
738 
745  static QString driverForExtension( const QString &extension );
746 
753  static QString fileFilterString( VectorFormatOptions options = SortRecommended );
754 
756  static QString filterForDriver( const QString &driverName );
757 
759  static QString convertCodecNameForEncodingOption( const QString &codecName );
760 
763 
765  QString errorMessage();
766 
767  bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) override;
768  bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) override;
769  QString lastError() const override;
770 
775  bool addFeatureWithStyle( QgsFeature &feature, QgsFeatureRenderer *renderer, QgsUnitTypes::DistanceUnit outputUnit = QgsUnitTypes::DistanceMeters );
776 
778  QMap<int, int> attrIdxToOgrIdx() { return mAttrIdxToOgrIdx; } SIP_SKIP
779 
781  ~QgsVectorFileWriter() override;
782 
788  static bool deleteShapeFile( const QString &fileName );
789 
790  QgsVectorFileWriter::SymbologyExport symbologyExport() const { return mSymbologyExport; }
791  void setSymbologyExport( QgsVectorFileWriter::SymbologyExport symExport ) { mSymbologyExport = symExport; }
792 
799  double symbologyScale() const { return mSymbologyScale; }
800 
807  void setSymbologyScale( double scale );
808 
809  static bool driverMetadata( const QString &driverName, MetaData &driverMetadata );
810 
817  static QStringList defaultDatasetOptions( const QString &driverName );
818 
825  static QStringList defaultLayerOptions( const QString &driverName );
826 
833  static OGRwkbGeometryType ogrTypeFromWkbType( QgsWkbTypes::Type type ) SIP_SKIP;
834 
839  static QgsVectorFileWriter::EditionCapabilities editionCapabilities( const QString &datasetName );
840 
845  static bool targetLayerExists( const QString &datasetName,
846  const QString &layerName );
847 
852  static bool areThereNewFieldsToCreate( const QString &datasetName,
853  const QString &layerName,
854  QgsVectorLayer *layer,
855  const QgsAttributeList &attributes );
856 
857  protected:
859  OGRGeometryH createEmptyGeometry( QgsWkbTypes::Type wkbType ) SIP_SKIP;
860 
862  OGRLayerH mLayer = nullptr;
863  OGRSpatialReferenceH mOgrRef = nullptr;
864 
866 
869  QString mErrorMessage;
870 
871  QTextCodec *mCodec = nullptr;
872 
875 
877  QMap<int, int> mAttrIdxToOgrIdx;
878 
880 
881  QMap< QgsSymbolLayer *, QString > mSymbolLayerTable;
882 
885 
886  QString mOgrDriverName;
887 
889  FieldValueConverter *mFieldValueConverter = nullptr;
890 
891  private:
892 #ifdef SIP_RUN
894 #endif
895 
896  struct PreparedWriterDetails
897  {
898  std::unique_ptr< QgsFeatureRenderer > renderer;
900  QgsWkbTypes::Type sourceWkbType = QgsWkbTypes::Unknown;
901  QgsFields sourceFields;
902  QString providerType;
903  long featureCount = 0;
904  QgsFeatureIds selectedFeatureIds;
905  QString dataSourceUri;
906  QString storageType;
907  QgsFeatureIterator geometryTypeScanIterator;
908  QgsExpressionContext expressionContext;
909  QSet< int > fieldsToConvertToInt;
910  QgsRenderContext renderContext;
911  bool shallTransform = false;
914  QgsAttributeList attributes;
915  QgsFields outputFields;
916  QgsFeatureIterator sourceFeatureIterator;
917  QgsGeometry filterRectGeometry;
918  std::unique_ptr< QgsGeometryEngine > filterRectEngine;
919  QVariantMap providerUriParams;
920  };
921 
926  static QgsVectorFileWriter::WriterError prepareWriteAsVectorFormat( QgsVectorLayer *layer,
928  PreparedWriterDetails &details );
929 
943  static QgsVectorFileWriter::WriterError writeAsVectorFormatV2( PreparedWriterDetails &details,
944  const QString &fileName,
945  const QgsCoordinateTransformContext &transformContext,
947  QString *newFilename = nullptr,
948  QString *newLayer = nullptr,
949  QString *errorMessage SIP_OUT = nullptr );
950 
956  Q_DECL_DEPRECATED static QgsVectorFileWriter::WriterError writeAsVectorFormat( PreparedWriterDetails &details,
957  const QString &fileName,
959  QString *newFilename = nullptr,
960  QString *errorMessage SIP_OUT = nullptr,
961  QString *newLayer = nullptr ) SIP_DEPRECATED;
962 
963  void init( QString vectorFileName, QString fileEncoding, const QgsFields &fields,
964  QgsWkbTypes::Type geometryType, QgsCoordinateReferenceSystem srs,
965  const QString &driverName, QStringList datasourceOptions,
966  QStringList layerOptions, QString *newFilename,
967  QgsVectorFileWriter::FieldValueConverter *fieldValueConverter,
968  const QString &layerName,
969  QgsVectorFileWriter::ActionOnExistingFile action, QString *newLayer, QgsFeatureSink::SinkFlags sinkFlags,
970  const QgsCoordinateTransformContext &transformContext );
971  void resetMap( const QgsAttributeList &attributes );
972 
973  std::unique_ptr< QgsFeatureRenderer > mRenderer;
974  QgsRenderContext mRenderContext;
975 
976 
977  std::unique_ptr< QgsCoordinateTransform > mCoordinateTransform;
978 
979  bool mUsingTransaction = false;
980  bool supportsStringList = false;
981 
982  void createSymbolLayerTable( QgsVectorLayer *vl, const QgsCoordinateTransform &ct, OGRDataSourceH ds );
983  gdal::ogr_feature_unique_ptr createFeature( const QgsFeature &feature );
984  bool writeFeature( OGRLayerH layer, OGRFeatureH feature );
985 
987  QgsVectorFileWriter::WriterError exportFeaturesSymbolLevels( const PreparedWriterDetails &details, QgsFeatureIterator &fit, const QgsCoordinateTransform &ct, QString *errorMessage = nullptr );
988  double mmScaleFactor( double scale, QgsUnitTypes::RenderUnit symbolUnits, QgsUnitTypes::DistanceUnit mapUnits );
989  double mapUnitScaleFactor( double scale, QgsUnitTypes::RenderUnit symbolUnits, QgsUnitTypes::DistanceUnit mapUnits );
990 
991  void startRender( QgsFeatureRenderer *sourceRenderer, const QgsFields &fields );
992  void stopRender();
993  std::unique_ptr< QgsFeatureRenderer > createSymbologyRenderer( QgsFeatureRenderer *sourceRenderer ) const;
995  static void addRendererAttributes( QgsFeatureRenderer *renderer, QgsRenderContext &context, const QgsFields &fields, QgsAttributeList &attList );
996 
998  static QStringList concatenateOptions( const QMap<QString, Option *> &options );
999 
1001  friend class TestQgsVectorFileWriter;
1002 };
1003 
1004 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsVectorFileWriter::EditionCapabilities )
1005 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsVectorFileWriter::VectorFormatOptions )
1006 
1007 // clazy:excludeall=qstring-allocations
1008 
1009 #endif
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.
Definition: qgsrectangle.h:41
QgsVectorFileWriter::OptionType type
Details of available driver formats.
void setSymbologyExport(QgsVectorFileWriter::SymbologyExport symExport)
QSet< QgsFeatureId > QgsFeatureIds
Definition: qgsfeatureid.h:37
QMap< int, int > attrIdxToOgrIdx()
QStringList globs
Matching glob patterns for format, e.g.
WriterError mError
Contains error value if construction was not successful.
Details of available filters and formats.
QString filterString
Filter string for file picker dialogs.
QList< QgsFeature > QgsFeatureList
Definition: qgsfeature.h:583
Handles storage of information regarding WKB types and their properties.
Definition: qgswkbtypes.h:41
SymbologyExport mSymbologyExport
QgsAttributeList attributes
Attributes to export (empty means all unless skipAttributeCreation is set)
Helper functions for various unit types.
Definition: qgsunittypes.h:38
An interface for objects which accept features via addFeature(s) methods.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
QMap< QgsSymbolLayer *, QString > mSymbolLayerTable
Container of fields for a vector layer.
Definition: qgsfields.h:44
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:123
StringOption(const QString &docString, const QString &defaultValue=QString())
MetaData(const QString &longName, const QString &trLongName, const QString &glob, const QString &ext, const QMap< QString, QgsVectorFileWriter::Option *> &driverOptions, const QMap< QString, QgsVectorFileWriter::Option *> &layerOptions, const QString &compulsoryEncoding=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...
Definition: qgsfeature.h:55
gdal::ogr_datasource_unique_ptr mDS
QgsVectorFileWriter::SymbologyExport symbologyExport() const
Base class for feedback objects to be used for cancellation of something running in a worker thread...
Definition: qgsfeedback.h:43
IntOption(const QString &docString, int defaultValue)
Options to pass to writeAsVectorFormat()
Option(const QString &docString, QgsVectorFileWriter::OptionType type)
Type
The WKB type describes the number of dimensions a geometry has.
Definition: qgswkbtypes.h:69
std::unique_ptr< std::remove_pointer< OGRFeatureH >::type, OGRFeatureDeleter > ogr_feature_unique_ptr
Scoped OGR feature.
Definition: qgsogrutils.h:129
#define SIP_SKIP
Definition: qgis_sip.h:126
QString driverName
Unique driver name.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
Definition: qgsgeos.h:79
QStringList datasourceOptions
List of OGR data source creation options.
SetOption(const QString &docString, const QStringList &values, const QString &defaultValue, bool allowNone=false)
QMap< QString, QgsVectorFileWriter::Option * > layerOptions
ActionOnExistingFile
Combination of CanAddNewLayer, CanAppendToExistingLayer, CanAddNewFieldsToExistingLayer or CanDeleteL...
#define SIP_FACTORY
Definition: qgis_sip.h:76
Encapsulate a field in an attribute table or data source.
Definition: qgsfield.h:49
Contains information about the context in which a coordinate transform is executed.
#define SIP_DEPRECATED
Definition: qgis_sip.h:106
QMap< int, int > mAttrIdxToOgrIdx
Map attribute indizes to OGR field indexes.
QgsRectangle filterExtent
If not empty, only features intersecting the extent will be saved.
double symbologyScale() const
Returns the reference scale for output.
DistanceUnit
Units of distance.
Definition: qgsunittypes.h:67
QString compulsoryEncoding
Some formats require a compulsory encoding, typically UTF-8. If no compulsory encoding, empty string.
Contains information about the context of a rendering operation.
EditionCapability
Edition capability flags.
#define SIP_OUT
Definition: qgis_sip.h:58
double mSymbologyScale
Scale for symbology export (e.g. for symbols units in map units)
This class represents a coordinate reference system (CRS).
QMap< QString, QgsVectorFileWriter::Option * > driverOptions
Class for doing transforms between two map coordinate systems.
const QgsCoordinateReferenceSystem & outputCrs
QgsCoordinateTransform ct
Transform to reproject exported geometries with, or invalid transform for no transformation.
VectorFormatOption
Options for sorting and filtering vector formats.
Interface to convert raw field values to their user-friendly value.
QgsTask task which performs a QgsVectorFileWriter layer saving operation as a background task...
QList< int > QgsAttributeList
Definition: qgsfield.h:26
QString layerName
Layer name. If let empty, it will be derived from the filename.
std::unique_ptr< std::remove_pointer< OGRDataSourceH >::type, OGRDataSourceDeleter > ogr_datasource_unique_ptr
Scoped OGR data source.
Definition: qgsogrutils.h:114
Represents a vector layer which manages a vector based data sets.
Writing was interrupted by manual cancellation.
const QgsField & field
Definition: qgsfield.h:471
QgsWkbTypes::Type mWkbType
Geometry type which is being used.
QString longName
Descriptive, user friendly name for the driver.
void * OGRSpatialReferenceH