QGIS API Documentation  3.23.0-Master (b5237dafc3)
qgsvectorlayer.h
Go to the documentation of this file.
1 
2 /***************************************************************************
3  -------------------
4  begin : Oct 29, 2003
5  copyright : (C) 2003 by Gary E.Sherman
6  email : sherman at mrcc.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSVECTORLAYER_H
19 #define QGSVECTORLAYER_H
20 
21 
22 #include "qgis_core.h"
23 #include <QMap>
24 #include <QSet>
25 #include <QList>
26 #include <QStringList>
27 #include <QFont>
28 #include <QMutex>
29 
30 #include "qgis.h"
31 #include "qgsmaplayer.h"
32 #include "qgsfeature.h"
33 #include "qgsfeaturerequest.h"
34 #include "qgsfeaturesource.h"
35 #include "qgsfields.h"
36 #include "qgsvectordataprovider.h"
38 #include "qgseditformconfig.h"
40 #include "qgsaggregatecalculator.h"
41 #include "qgsfeatureiterator.h"
44 #include "qgsexpressioncontext.h"
45 
46 class QPainter;
47 class QImage;
48 
50 class QgsActionManager;
52 class QgsCurve;
54 class QgsDiagramRenderer;
57 class QgsFeatureRenderer;
58 class QgsGeometry;
59 class QgsGeometryVertexIndex;
60 class QgsMapToPixel;
61 class QgsRectangle;
62 class QgsRectangle;
63 class QgsRelation;
64 class QgsWeakRelation;
65 class QgsRelationManager;
68 class QgsSymbol;
75 class QgsPoint;
76 class QgsFeedback;
78 class QgsAuxiliaryLayer;
79 class QgsGeometryOptions;
83 
84 typedef QList<int> QgsAttributeList;
85 typedef QSet<int> QgsAttributeIds;
86 
87 // TODO QGIS4: Remove virtual from non-inherited methods (like isModified)
88 
392 {
393  Q_OBJECT
394 
395  Q_PROPERTY( QString subsetString READ subsetString WRITE setSubsetString NOTIFY subsetStringChanged )
396  Q_PROPERTY( QString displayExpression READ displayExpression WRITE setDisplayExpression NOTIFY displayExpressionChanged )
397  Q_PROPERTY( QString mapTipTemplate READ mapTipTemplate WRITE setMapTipTemplate NOTIFY mapTipTemplateChanged )
398  Q_PROPERTY( QgsEditFormConfig editFormConfig READ editFormConfig WRITE setEditFormConfig NOTIFY editFormConfigChanged )
399  Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly NOTIFY readOnlyChanged )
400  Q_PROPERTY( bool supportsEditing READ supportsEditing NOTIFY supportsEditingChanged )
401 
402  public:
403 
409  {
410 
414  explicit LayerOptions( bool loadDefaultStyle = true,
415  bool readExtentFromXml = false )
416  : loadDefaultStyle( loadDefaultStyle )
417  , readExtentFromXml( readExtentFromXml )
418  {}
419 
424  explicit LayerOptions( const QgsCoordinateTransformContext &transformContext,
425  bool loadDefaultStyle = true,
426  bool readExtentFromXml = false
427  )
428  : loadDefaultStyle( loadDefaultStyle )
429  , readExtentFromXml( readExtentFromXml )
430  , transformContext( transformContext )
431  {}
432 
434  bool loadDefaultStyle = true;
435 
440  bool readExtentFromXml = false;
441 
447 
460 
473 
487  bool skipCrsValidation = false;
488 
489  };
490 
495  struct CORE_EXPORT DeleteContext
496  {
497 
501  explicit DeleteContext( bool cascade = false, QgsProject *project = nullptr ): cascade( cascade ), project( project ) {}
502 
509  QList<QgsVectorLayer *> handledLayers( bool includeAuxiliaryLayers = true ) const;
510 
514  QgsFeatureIds handledFeatures( QgsVectorLayer *layer ) const;
515 
516  QMap<QgsVectorLayer *, QgsFeatureIds> mHandledFeatures SIP_SKIP;
517  bool cascade;
519  };
520 
534  explicit QgsVectorLayer( const QString &path = QString(), const QString &baseName = QString(),
535  const QString &providerLib = "ogr", const QgsVectorLayer::LayerOptions &options = QgsVectorLayer::LayerOptions() );
536 
537  ~QgsVectorLayer() override;
538 
540  QgsVectorLayer( const QgsVectorLayer &rhs ) = delete;
542  QgsVectorLayer &operator=( QgsVectorLayer const &rhs ) = delete;
543 
544 #ifdef SIP_RUN
545  SIP_PYOBJECT __repr__();
546  % MethodCode
547  QString str = QStringLiteral( "<QgsVectorLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider() ? sipCpp->dataProvider()->name() : QStringLiteral( "Invalid" ) );
548  sipRes = PyUnicode_FromString( str.toUtf8().constData() );
549  % End
550 #endif
551 
560  QgsVectorLayer *clone() const override SIP_FACTORY;
561 
566  QString storageType() const;
567 
571  QString capabilitiesString() const;
572 
573 
583  bool isSqlQuery() const;
584 
591  Qgis::VectorLayerTypeFlags vectorLayerTypeFlags() const;
592 
593 
597  QString dataComment() const;
598 
606  QString displayField() const;
607 
615  void setDisplayExpression( const QString &displayExpression );
616 
623  QString displayExpression() const;
624 
625  QgsVectorDataProvider *dataProvider() FINAL;
626  const QgsVectorDataProvider *dataProvider() const FINAL SIP_SKIP;
627 
631  QgsMapLayerTemporalProperties *temporalProperties() override;
632 
643  void setProviderEncoding( const QString &encoding );
644 
646  void setCoordinateSystem();
647 
653  bool addJoin( const QgsVectorLayerJoinInfo &joinInfo );
654 
659  bool removeJoin( const QString &joinLayerId );
660 
665  QgsVectorLayerJoinBuffer *joinBuffer() { return mJoinBuffer; }
666 
671  const QgsVectorLayerJoinBuffer *joinBuffer() const { return mJoinBuffer; } SIP_SKIP;
672 
673  const QList<QgsVectorLayerJoinInfo> vectorJoins() const;
674 
683  bool setDependencies( const QSet<QgsMapLayerDependency> &layers ) FINAL;
684 
692  QSet<QgsMapLayerDependency> dependencies() const FINAL;
693 
704  int addExpressionField( const QString &exp, const QgsField &fld );
705 
713  void removeExpressionField( int index );
714 
724  QString expressionField( int index ) const;
725 
735  void updateExpressionField( int index, const QString &exp );
736 
743  QgsActionManager *actions() { return mActions; }
744 
750  const QgsActionManager *actions() const SIP_SKIP { return mActions; }
751 
757  int selectedFeatureCount() const;
758 
768  Q_INVOKABLE void selectByRect( QgsRectangle &rect, Qgis::SelectBehavior behavior = Qgis::SelectBehavior::SetSelection );
769 
779  Q_INVOKABLE void selectByExpression( const QString &expression, Qgis::SelectBehavior behavior = Qgis::SelectBehavior::SetSelection );
780 
791  Q_INVOKABLE void selectByIds( const QgsFeatureIds &ids, Qgis::SelectBehavior behavior = Qgis::SelectBehavior::SetSelection );
792 
804  Q_INVOKABLE void modifySelection( const QgsFeatureIds &selectIds, const QgsFeatureIds &deselectIds );
805 
807  Q_INVOKABLE void invertSelection();
808 
810  Q_INVOKABLE void selectAll();
811 
819  Q_INVOKABLE void invertSelectionInRectangle( QgsRectangle &rect );
820 
833  Q_INVOKABLE QgsFeatureList selectedFeatures() const;
834 
850  QgsFeatureIterator getSelectedFeatures( QgsFeatureRequest request = QgsFeatureRequest() ) const;
851 
859  Q_INVOKABLE const QgsFeatureIds &selectedFeatureIds() const;
860 
862  Q_INVOKABLE QgsRectangle boundingBoxOfSelected() const;
863 
871  bool labelsEnabled() const;
872 
882  void setLabelsEnabled( bool enabled );
883 
889  bool diagramsEnabled() const;
890 
892  void setDiagramRenderer( QgsDiagramRenderer *r SIP_TRANSFER );
893  const QgsDiagramRenderer *diagramRenderer() const { return mDiagramRenderer; }
894 
895  void setDiagramLayerSettings( const QgsDiagramLayerSettings &s );
896  const QgsDiagramLayerSettings *diagramLayerSettings() const { return mDiagramLayerSettings; }
897 
904  QgsFeatureRenderer *renderer() { return mRenderer; }
905 
913  const QgsFeatureRenderer *renderer() const SIP_SKIP { return mRenderer; }
914 
921  void setRenderer( QgsFeatureRenderer *r SIP_TRANSFER );
922 
932  void addFeatureRendererGenerator( QgsFeatureRendererGenerator *generator SIP_TRANSFER );
933 
943  void removeFeatureRendererGenerator( const QString &id );
944 
952  QList< const QgsFeatureRendererGenerator * > featureRendererGenerators() const;
953 
955  Q_INVOKABLE QgsWkbTypes::GeometryType geometryType() const;
956 
958  Q_INVOKABLE QgsWkbTypes::Type wkbType() const FINAL;
959 
960  QgsCoordinateReferenceSystem sourceCrs() const FINAL;
961  QString sourceName() const FINAL;
962 
967  bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context ) FINAL;
968 
973  bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const FINAL;
974 
975  QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const FINAL;
976  QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const FINAL;
977 
982  void resolveReferences( QgsProject *project ) FINAL;
983 
992  virtual void saveStyleToDatabase( const QString &name, const QString &description,
993  bool useAsDefault, const QString &uiFileContent,
994  QString &msgError SIP_OUT );
995 
1005  virtual int listStylesInDatabase( QStringList &ids SIP_OUT, QStringList &names SIP_OUT,
1006  QStringList &descriptions SIP_OUT, QString &msgError SIP_OUT );
1007 
1011  virtual QString getStyleFromDatabase( const QString &styleId, QString &msgError SIP_OUT );
1012 
1020  virtual bool deleteStyleFromDatabase( const QString &styleId, QString &msgError SIP_OUT );
1021 
1029  virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag SIP_OUT, bool loadFromLocalDb,
1030  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
1031 
1036  QString loadNamedStyle( const QString &theURI, bool &resultFlag SIP_OUT,
1037  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) FINAL;
1038 
1052  bool loadAuxiliaryLayer( const QgsAuxiliaryStorage &storage, const QString &key = QString() );
1053 
1063  void setAuxiliaryLayer( QgsAuxiliaryLayer *layer SIP_TRANSFER = nullptr );
1064 
1070  QgsAuxiliaryLayer *auxiliaryLayer();
1071 
1077  const QgsAuxiliaryLayer *auxiliaryLayer() const SIP_SKIP;
1078 
1079  bool readSymbology( const QDomNode &layerNode, QString &errorMessage,
1080  QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) FINAL;
1081  bool readStyle( const QDomNode &node, QString &errorMessage,
1082  QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) FINAL;
1083  bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage,
1084  const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const FINAL;
1085  bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage,
1086  const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const FINAL;
1087 
1096  bool writeSld( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QVariantMap &props = QVariantMap() ) const;
1097 
1098  bool readSld( const QDomNode &node, QString &errorMessage ) FINAL;
1099 
1105  long long featureCount( const QString &legendKey ) const;
1106 
1113  QgsFeatureIds symbolFeatureIds( const QString &legendKey ) const;
1114 
1125  FeatureAvailability hasFeatures() const FINAL;
1126 
1127 
1128  QString loadDefaultStyle( bool &resultFlag SIP_OUT ) FINAL;
1129 
1143  QgsVectorLayerFeatureCounter *countSymbolFeatures( bool storeSymbolFids = false );
1144 
1152  virtual bool setSubsetString( const QString &subset );
1153 
1158  virtual QString subsetString() const;
1159 
1165  QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const FINAL;
1166 
1170  inline QgsFeatureIterator getFeatures( const QString &expression )
1171  {
1172  return getFeatures( QgsFeatureRequest( expression ) );
1173  }
1174 
1179  inline QgsFeature getFeature( QgsFeatureId fid ) const
1180  {
1181  QgsFeature feature;
1182  getFeatures( QgsFeatureRequest( fid ) ).nextFeature( feature );
1183  return feature;
1184  }
1185 
1190  QgsGeometry getGeometry( QgsFeatureId fid ) const;
1191 
1196  {
1197  return getFeatures( QgsFeatureRequest( fids ) );
1198  }
1199 
1203  inline QgsFeatureIterator getFeatures( const QgsRectangle &rectangle )
1204  {
1205  return getFeatures( QgsFeatureRequest( rectangle ) );
1206  }
1207 
1208  bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) FINAL;
1209 
1235  bool updateFeature( QgsFeature &feature, bool skipDefaultValues = false );
1236 
1248  bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );
1249 
1261  bool insertVertex( const QgsPoint &point, QgsFeatureId atFeatureId, int beforeVertex );
1262 
1273  bool moveVertex( double x, double y, QgsFeatureId atFeatureId, int atVertex );
1274 
1285  bool moveVertex( const QgsPoint &p, QgsFeatureId atFeatureId, int atVertex ) SIP_PYNAME( moveVertexV2 );
1286 
1297  Qgis::VectorEditResult deleteVertex( QgsFeatureId featureId, int vertex );
1298 
1306  Q_INVOKABLE bool deleteSelectedFeatures( int *deletedCount = nullptr, DeleteContext *context = nullptr );
1307 
1328  Q_DECL_DEPRECATED Qgis::GeometryOperationResult addRing( const QVector<QgsPointXY> &ring, QgsFeatureId *featureId = nullptr ) SIP_DEPRECATED;
1329 
1330 
1350  Q_INVOKABLE Qgis::GeometryOperationResult addRing( const QgsPointSequence &ring, QgsFeatureId *featureId = nullptr );
1351 
1372  Q_INVOKABLE Qgis::GeometryOperationResult addRing( QgsCurve *ring SIP_TRANSFER, QgsFeatureId *featureId = nullptr ) SIP_PYNAME( addCurvedRing );
1373 
1393  Q_DECL_DEPRECATED Qgis::GeometryOperationResult addPart( const QList<QgsPointXY> &ring ) SIP_DEPRECATED;
1394 
1395 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
1396 
1417  Q_DECL_DEPRECATED Qgis::GeometryOperationResult addPart( const QVector<QgsPointXY> &ring ) SIP_PYNAME( addPartV2 ) SIP_DEPRECATED;
1418 #endif
1419 
1439  Q_INVOKABLE Qgis::GeometryOperationResult addPart( const QgsPointSequence &ring ) SIP_PYNAME( addPartV2 );
1440 
1448  Q_INVOKABLE Qgis::GeometryOperationResult addPart( QgsCurve *ring SIP_TRANSFER ) SIP_PYNAME( addCurvedPart );
1449 
1461  Q_INVOKABLE int translateFeature( QgsFeatureId featureId, double dx, double dy );
1462 
1483  Q_DECL_DEPRECATED Qgis::GeometryOperationResult splitParts( const QVector<QgsPointXY> &splitLine, bool topologicalEditing = false ) SIP_DEPRECATED;
1484 
1504  Q_INVOKABLE Qgis::GeometryOperationResult splitParts( const QgsPointSequence &splitLine, bool topologicalEditing = false );
1505 
1526  Q_DECL_DEPRECATED Qgis::GeometryOperationResult splitFeatures( const QVector<QgsPointXY> &splitLine, bool topologicalEditing = false ) SIP_DEPRECATED;
1527 
1547  Q_INVOKABLE Qgis::GeometryOperationResult splitFeatures( const QgsPointSequence &splitLine, bool topologicalEditing = false );
1548 
1571  Q_INVOKABLE Qgis::GeometryOperationResult splitFeatures( const QgsCurve *curve, QgsPointSequence &topologyTestPoints SIP_OUT, bool preserveCircular = false, bool topologicalEditing = false );
1572 
1586  int addTopologicalPoints( const QgsGeometry &geom );
1587 
1604  Q_DECL_DEPRECATED int addTopologicalPoints( const QgsPointXY &p ) SIP_DEPRECATED;
1605 
1622  int addTopologicalPoints( const QgsPoint &p );
1623 
1640  int addTopologicalPoints( const QgsPointSequence &ps );
1641 
1648  const QgsAbstractVectorLayerLabeling *labeling() const SIP_SKIP { return mLabeling; }
1649 
1656  QgsAbstractVectorLayerLabeling *labeling() { return mLabeling; }
1657 
1662  void setLabeling( QgsAbstractVectorLayerLabeling *labeling SIP_TRANSFER );
1663 
1665  bool isEditable() const FINAL;
1666 
1668  bool isSpatial() const FINAL;
1669 
1671  bool isModified() const override;
1672 
1679  bool isAuxiliaryField( int index, int &srcIndex ) const;
1680 
1682  void reload() FINAL;
1683 
1688  QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) FINAL SIP_FACTORY;
1689 
1690  QgsRectangle extent() const FINAL;
1691  QgsRectangle sourceExtent() const FINAL;
1692 
1699  QgsFields fields() const FINAL;
1700 
1704  inline QgsAttributeList attributeList() const { return mFields.allAttributesList(); }
1705 
1709  QgsAttributeList primaryKeyAttributes() const;
1710 
1716  long long featureCount() const FINAL;
1717 
1722  bool setReadOnly( bool readonly = true );
1723 
1729  bool supportsEditing() const override;
1730 
1751  bool changeGeometry( QgsFeatureId fid, QgsGeometry &geometry, bool skipDefaultValue = false );
1752 
1783  bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant(), bool skipDefaultValues = false );
1784 
1820  bool changeAttributeValues( QgsFeatureId fid, const QgsAttributeMap &newValues, const QgsAttributeMap &oldValues = QgsAttributeMap(), bool skipDefaultValues = false );
1821 
1831  bool addAttribute( const QgsField &field );
1832 
1838  void setFieldAlias( int index, const QString &aliasString );
1839 
1845  void removeFieldAlias( int index );
1846 
1857  bool renameAttribute( int index, const QString &newName );
1858 
1865  QString attributeAlias( int index ) const;
1866 
1868  QString attributeDisplayName( int index ) const;
1869 
1871  QgsStringMap attributeAliases() const;
1872 
1877  Q_DECL_DEPRECATED QSet<QString> excludeAttributesWms() const SIP_DEPRECATED;
1878 
1883  Q_DECL_DEPRECATED void setExcludeAttributesWms( const QSet<QString> &att ) SIP_DEPRECATED;
1884 
1889  Q_DECL_DEPRECATED QSet<QString> excludeAttributesWfs() const SIP_DEPRECATED;
1890 
1895  Q_DECL_DEPRECATED void setExcludeAttributesWfs( const QSet<QString> &att ) SIP_DEPRECATED;
1896 
1905  virtual bool deleteAttribute( int attr );
1906 
1914  bool deleteAttributes( const QList<int> &attrs );
1915 
1916  bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) FINAL;
1917 
1928  bool deleteFeature( QgsFeatureId fid, DeleteContext *context = nullptr );
1929 
1943  bool deleteFeatures( const QgsFeatureIds &fids, DeleteContext *context = nullptr );
1944 
1968  Q_INVOKABLE bool commitChanges( bool stopEditing = true );
1969 
1975  QStringList commitErrors() const;
1976 
1986  Q_INVOKABLE bool rollBack( bool deleteBuffer = true );
1987 
1994  QList<QgsRelation> referencingRelations( int idx ) const;
1995 
2002  QList<QgsWeakRelation> weakRelations( ) const SIP_SKIP;
2003 
2004 
2006  Q_INVOKABLE QgsVectorLayerEditBuffer *editBuffer() { return mEditBuffer; }
2007 
2012  const QgsVectorLayerEditBuffer *editBuffer() const SIP_SKIP { return mEditBuffer; }
2013 
2018  void beginEditCommand( const QString &text );
2019 
2021  void endEditCommand();
2022 
2024  void destroyEditCommand();
2025 
2030  Q_DECL_DEPRECATED static void drawVertexMarker( double x, double y, QPainter &p, Qgis::VertexMarkerType type, int vertexSize );
2031 
2040  void updateFields();
2041 
2056  QVariant defaultValue( int index, const QgsFeature &feature = QgsFeature(),
2057  QgsExpressionContext *context = nullptr ) const;
2058 
2070  void setDefaultValueDefinition( int index, const QgsDefaultValue &definition );
2071 
2082  QgsDefaultValue defaultValueDefinition( int index ) const;
2083 
2091  QgsFieldConstraints::Constraints fieldConstraints( int fieldIndex ) const;
2092 
2098  QMap< QgsFieldConstraints::Constraint, QgsFieldConstraints::ConstraintStrength> fieldConstraintsAndStrength( int fieldIndex ) const;
2099 
2109 
2117  void removeFieldConstraint( int index, QgsFieldConstraints::Constraint constraint );
2118 
2126  QString constraintExpression( int index ) const;
2127 
2135  QString constraintDescription( int index ) const;
2136 
2145  void setConstraintExpression( int index, const QString &expression, const QString &description = QString() );
2146 
2152  void setFieldConfigurationFlags( int index, QgsField::ConfigurationFlags flags ) SIP_SKIP;
2153 
2158  void setFieldConfigurationFlag( int index, QgsField::ConfigurationFlag flag, bool active ) SIP_SKIP;
2159 
2165  QgsField::ConfigurationFlags fieldConfigurationFlags( int index ) const SIP_SKIP;
2166 
2170  void setEditorWidgetSetup( int index, const QgsEditorWidgetSetup &setup );
2171 
2178  QgsEditorWidgetSetup editorWidgetSetup( int index ) const;
2179 
2191  QSet<QVariant> uniqueValues( int fieldIndex, int limit = -1 ) const FINAL;
2192 
2206  QStringList uniqueStringsMatching( int index, const QString &substring, int limit = -1,
2207  QgsFeedback *feedback = nullptr ) const;
2208 
2223  QVariant minimumValue( int index ) const FINAL;
2224 
2239  QVariant maximumValue( int index ) const FINAL;
2240 
2241 
2261  void minimumAndMaximumValue( int index, QVariant &minimum SIP_OUT, QVariant &maximum SIP_OUT ) const;
2262 
2277  QVariant aggregate( QgsAggregateCalculator::Aggregate aggregate,
2278  const QString &fieldOrExpression,
2279  const QgsAggregateCalculator::AggregateParameters &parameters = QgsAggregateCalculator::AggregateParameters(),
2280  QgsExpressionContext *context = nullptr,
2281  bool *ok = nullptr,
2282  QgsFeatureIds *fids = nullptr,
2283  QgsFeedback *feedback = nullptr,
2284  QString *error SIP_PYARGREMOVE = nullptr ) const;
2285 
2287  void setFeatureBlendMode( QPainter::CompositionMode blendMode );
2289  QPainter::CompositionMode featureBlendMode() const;
2290 
2291  QString htmlMetadata() const FINAL;
2292 
2297  void setSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod ) { mSimplifyMethod = simplifyMethod; }
2298 
2303  inline const QgsVectorSimplifyMethod &simplifyMethod() const { return mSimplifyMethod; }
2304 
2310  bool simplifyDrawingCanbeApplied( const QgsRenderContext &renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint ) const;
2311 
2319  QgsConditionalLayerStyles *conditionalStyles() const;
2320 
2325  QgsAttributeTableConfig attributeTableConfig() const;
2326 
2331  void setAttributeTableConfig( const QgsAttributeTableConfig &attributeTableConfig );
2332 
2340  QString mapTipTemplate() const;
2341 
2349  void setMapTipTemplate( const QString &mapTipTemplate );
2350 
2352 
2353  QgsExpressionContextScope *createExpressionContextScope() const FINAL SIP_FACTORY;
2354 
2362  QgsEditFormConfig editFormConfig() const;
2363 
2370  void setEditFormConfig( const QgsEditFormConfig &editFormConfig );
2371 
2379  void setReadExtentFromXml( bool readExtentFromXml );
2380 
2388  bool readExtentFromXml() const;
2389 
2395  bool isEditCommandActive() const { return mEditCommandActive; }
2396 
2402  QgsGeometryOptions *geometryOptions() const;
2403 
2421  bool allowCommit() const SIP_SKIP;
2422 
2440  void setAllowCommit( bool allowCommit ) SIP_SKIP;
2441 
2447  QgsStoredExpressionManager *storedExpressionManager() { return mStoredExpressionManager; }
2448 
2449  public slots:
2450 
2458  void select( QgsFeatureId featureId );
2459 
2467  Q_INVOKABLE void select( const QgsFeatureIds &featureIds );
2468 
2476  void deselect( QgsFeatureId featureId );
2477 
2485  Q_INVOKABLE void deselect( const QgsFeatureIds &featureIds );
2486 
2493  Q_INVOKABLE void removeSelection();
2494 
2505  void reselect();
2506 
2513  virtual void updateExtents( bool force = false );
2514 
2529  Q_INVOKABLE bool startEditing();
2530 
2536  virtual void setTransformContext( const QgsCoordinateTransformContext &transformContext ) override;
2537 
2538  SpatialIndexPresence hasSpatialIndex() const override;
2539 
2540  bool accept( QgsStyleEntityVisitorInterface *visitor ) const override;
2541 
2542  signals:
2543 
2551  void selectionChanged( const QgsFeatureIds &selected, const QgsFeatureIds &deselected, bool clearAndSelect );
2552 
2559 
2561  void beforeModifiedCheck() const;
2562 
2565 
2571  void beforeCommitChanges( bool stopEditing );
2572 
2575 
2581 
2587 
2596  void attributeAdded( int idx );
2597 
2604  void beforeAddingExpressionField( const QString &fieldName );
2605 
2614  void attributeDeleted( int idx );
2615 
2623 
2630 
2640 
2650  void featuresDeleted( const QgsFeatureIds &fids );
2651 
2657 
2663 
2672  void attributeValueChanged( QgsFeatureId fid, int idx, const QVariant &value );
2673 
2681  void geometryChanged( QgsFeatureId fid, const QgsGeometry &geometry );
2682 
2684  void committedAttributesDeleted( const QString &layerId, const QgsAttributeList &deletedAttributes );
2686  void committedAttributesAdded( const QString &layerId, const QList<QgsField> &addedAttributes );
2688  void committedFeaturesAdded( const QString &layerId, const QgsFeatureList &addedFeatures );
2690  void committedFeaturesRemoved( const QString &layerId, const QgsFeatureIds &deletedFeatureIds );
2692  void committedAttributeValuesChanges( const QString &layerId, const QgsChangedAttributesMap &changedAttributesValues );
2694  void committedGeometriesChanges( const QString &layerId, const QgsGeometryMap &changedGeometries );
2695 
2697  void labelingFontNotFound( QgsVectorLayer *layer, const QString &fontfamily );
2698 
2700  void featureBlendModeChanged( QPainter::CompositionMode blendMode );
2701 
2707  void editCommandStarted( const QString &text );
2708 
2715 
2722 
2732  void readCustomSymbology( const QDomElement &element, QString &errorMessage );
2733 
2743  void writeCustomSymbology( QDomElement &element, QDomDocument &doc, QString &errorMessage ) const;
2744 
2751 
2758 
2762  void raiseError( const QString &msg );
2763 
2770 
2778 
2785 
2792 
2793  protected:
2795  void setExtent( const QgsRectangle &rect ) FINAL;
2796 
2797  private slots:
2798  void invalidateSymbolCountedFlag();
2799  void onFeatureCounterCompleted();
2800  void onFeatureCounterTerminated();
2801  void onJoinedFieldsChanged();
2802  void onFeatureDeleted( QgsFeatureId fid );
2803  void onRelationsLoaded();
2804  void onSymbolsCounted();
2805  void onDirtyTransaction( const QString &sql, const QString &name );
2806  void emitDataChanged();
2807  void onAfterCommitChangesDependency();
2808 
2809  private:
2810  void updateDefaultValues( QgsFeatureId fid, QgsFeature feature = QgsFeature() );
2811 
2815  bool isReadOnly() const FINAL;
2816 
2823  bool setDataProvider( QString const &provider, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() );
2824 
2836  void setDataSourcePrivate( const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags ) override;
2837 
2839  void readSldLabeling( const QDomNode &node );
2840 
2842  bool readSldTextSymbolizer( const QDomNode &node, QgsPalLayerSettings &settings ) const;
2843 
2845  QgsAbstractVectorLayerLabeling *readLabelingFromCustomProperties();
2846 
2847  bool deleteFeatureCascade( QgsFeatureId fid, DeleteContext *context = nullptr );
2848 
2849 #ifdef SIP_RUN
2850  QgsVectorLayer( const QgsVectorLayer &rhs );
2851 #endif
2853  void minimumOrMaximumValue( int index, QVariant *minimum, QVariant *maximum ) const;
2854 
2855  QgsConditionalLayerStyles *mConditionalStyles = nullptr;
2856 
2858  QgsVectorDataProvider *mDataProvider = nullptr;
2859 
2861  QgsVectorLayerTemporalProperties *mTemporalProperties = nullptr;
2862 
2864  QString mDisplayExpression;
2865 
2866  QString mMapTipTemplate;
2867 
2869  QgsActionManager *mActions = nullptr;
2870 
2872  bool mReadOnly = false;
2873 
2879  QgsFeatureIds mSelectedFeatureIds;
2880 
2884  QgsFeatureIds mPreviousSelectedFeatureIds;
2885 
2887  QgsFields mFields;
2888 
2890  QgsStringMap mAttributeAliasMap;
2891 
2893  QMap<QString, QgsDefaultValue> mDefaultExpressionMap;
2894 
2896  QSet<int> mDefaultValueOnUpdateFields;
2897 
2899  QMap< QString, QgsFieldConstraints::Constraints > mFieldConstraints;
2900 
2902  QMap< QPair< QString, QgsFieldConstraints::Constraint >, QgsFieldConstraints::ConstraintStrength > mFieldConstraintStrength;
2903 
2905  QMap< QString, QPair< QString, QString > > mFieldConstraintExpressions;
2906 
2907  QMap< QString, QgsField::ConfigurationFlags > mFieldConfigurationFlags;
2908  QMap< QString, QgsEditorWidgetSetup > mFieldWidgetSetups;
2909 
2911  QgsEditFormConfig mEditFormConfig;
2912 
2915 
2917  QgsFeatureRenderer *mRenderer = nullptr;
2918 
2920  QgsVectorSimplifyMethod mSimplifyMethod;
2921 
2923  QgsAbstractVectorLayerLabeling *mLabeling = nullptr;
2924 
2926  bool mLabelsEnabled = false;
2927 
2929  bool mLabelFontNotFoundNotified = false;
2930 
2932  QPainter::CompositionMode mFeatureBlendMode = QPainter::CompositionMode_SourceOver;
2933 
2935  bool mVertexMarkerOnlyForSelection = false;
2936 
2937  QStringList mCommitErrors;
2938 
2940  QgsVectorLayerEditBuffer *mEditBuffer = nullptr;
2943 
2944  //stores information about joined layers
2945  QgsVectorLayerJoinBuffer *mJoinBuffer = nullptr;
2946 
2948  QgsExpressionFieldBuffer *mExpressionFieldBuffer = nullptr;
2949 
2950  //diagram rendering object. 0 if diagram drawing is disabled
2951  QgsDiagramRenderer *mDiagramRenderer = nullptr;
2952 
2953  //stores infos about diagram placement (placement type, priority, position distance)
2954  QgsDiagramLayerSettings *mDiagramLayerSettings = nullptr;
2955 
2956  mutable bool mValidExtent = false;
2957  mutable bool mLazyExtent = true;
2958 
2960  std::unique_ptr<QgsAuxiliaryLayer> mAuxiliaryLayer;
2961 
2963  QString mAuxiliaryLayerKey;
2964 
2965  // Features in renderer classes counted
2966  bool mSymbolFeatureCounted = false;
2967 
2968  // Feature counts for each renderer legend key
2969  QHash<QString, long long> mSymbolFeatureCountMap;
2970  QHash<QString, QgsFeatureIds> mSymbolFeatureIdMap;
2971 
2973  bool mEditCommandActive = false;
2974 
2976  bool mCommitChangesActive = false;
2977 
2978  bool mReadExtentFromXml;
2979  QgsRectangle mXmlExtent;
2980 
2981  QgsFeatureIds mDeletedFids;
2982 
2983  QgsAttributeTableConfig mAttributeTableConfig;
2984 
2985  mutable QMutex mFeatureSourceConstructorMutex;
2986 
2987  QgsVectorLayerFeatureCounter *mFeatureCounter = nullptr;
2988 
2989  std::unique_ptr<QgsGeometryOptions> mGeometryOptions;
2990 
2991  bool mAllowCommit = true;
2992 
2994  QgsStoredExpressionManager *mStoredExpressionManager = nullptr;
2995 
2997 
2999  bool mDataChangedFired = false;
3000 
3001  QList<QgsWeakRelation> mWeakRelations;
3002 
3003  bool mSetLegendFromStyle = false;
3004 
3005  QList< QgsFeatureRendererGenerator * > mRendererGenerators;
3006 };
3007 
3008 
3009 
3010 // clazy:excludeall=qstring-allocations
3011 
3012 #endif
The Qgis class provides global constants for use throughout the application.
Definition: qgis.h:64
GeometryOperationResult
Success or failure of a geometry operation.
Definition: qgis.h:661
VertexMarkerType
Editing vertex markers, used for showing vertices during a edit operation.
Definition: qgis.h:588
SelectBehavior
Specifies how a selection should be applied.
Definition: qgis.h:559
@ SetSelection
Set selection, removing any existing selection.
Abstract base class for simplify geometries using a specific algorithm.
Abstract base class - its implementations define different approaches to the labeling of a vector lay...
Storage and management of actions associated with a layer.
Utility class for calculating aggregates for a field (or expression) over the features from a vector ...
This is a container for configuration of the attribute table.
Class allowing to manage the auxiliary storage for a vector layer.
Class providing some utility methods to manage auxiliary storage.
The QgsConditionalLayerStyles class holds conditional style information for a layer.
This class represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Abstract base class for curved geometry type.
Definition: qgscurve.h:36
Abstract base class for spatial data provider implementations.
The QgsDefaultValue class provides a container for managing client side default values for fields.
Stores the settings for rendering of all diagrams for a layer.
Evaluates and returns the diagram settings relating to a diagram for a specific feature.
Contains configuration settings for an editor form.
Holder for the widget type and its configuration for a field.
Manages an editor widget Widget and wrapper share the same parent.
Abstract interface for generating an expression context.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Abstract interface for generating an expression context scope.
Single scope for storing variables and functions for use within a QgsExpressionContext.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Buffers information about expression fields for a vector layer.
Wrapper for iterator of features from vector data provider or vector layer.
bool nextFeature(QgsFeature &f)
An interface for objects which generate feature renderers for vector layers.
This class wraps a request for features to a vector layer (or directly its vector data provider).
An interface for objects which accept features via addFeature(s) methods.
virtual bool addFeature(QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())
Adds a single feature to the sink.
An interface for objects which provide features via a getFeatures method.
virtual QSet< QVariant > uniqueValues(int fieldIndex, int limit=-1) const
Returns the set of unique values contained within the specified fieldIndex from this source.
virtual QgsWkbTypes::Type wkbType() const =0
Returns the geometry type for features returned by this source.
virtual QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const =0
Returns an iterator for the features in the source.
virtual long long featureCount() const =0
Returns the number of features contained in the source, or -1 if the feature count is unknown.
virtual SpatialIndexPresence hasSpatialIndex() const
Returns an enum value representing the presence of a valid spatial index on the source,...
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition: qgsfeature.h:56
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:45
ConstraintStrength
Strength of constraints.
@ ConstraintStrengthHard
Constraint must be honored before feature can be accepted.
Constraint
Constraints which may be present on a field.
Encapsulate a field in an attribute table or data source.
Definition: qgsfield.h:51
ConfigurationFlag
Configuration flags for fields These flags are meant to be user-configurable and are not describing a...
Definition: qgsfield.h:80
Container of fields for a vector layer.
Definition: qgsfields.h:45
The QgsGeometryOptions class contains options to automatically adjust geometries to constraints on a ...
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:125
Base class for utility classes that encapsulate information necessary for rendering of map layers.
Base class for storage of map layer temporal properties.
Base class for all map layer types.
Definition: qgsmaplayer.h:73
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the layer.
virtual bool setDependencies(const QSet< QgsMapLayerDependency > &layers)
Sets the list of dependencies.
virtual QSet< QgsMapLayerDependency > dependencies() const
Gets the list of dependencies.
friend class QgsVectorLayer
Definition: qgsmaplayer.h:2116
virtual bool isEditable() const
Returns true if the layer can be edited.
virtual QgsMapLayer * clone() const =0
Returns a new instance equivalent to this one except for the id which is still unique.
virtual void setExtent(const QgsRectangle &rect)
Sets the extent.
virtual void setTransformContext(const QgsCoordinateTransformContext &transformContext)=0
Sets the coordinate transform context to transformContext.
Perform transforms between map coordinates and device coordinates.
Definition: qgsmaptopixel.h:39
Contains settings for how a map layer will be labeled.
A class to represent a 2D point.
Definition: qgspointxy.h:59
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:49
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:101
The class is used as a container of context for various read/write operations on other objects.
A rectangle specified with double values.
Definition: qgsrectangle.h:42
This class manages a set of relations between layers.
Contains information about the context of a rendering operation.
Manages stored expressions regarding creation, modification and storing in the project.
An interface for classes which can visit style entity (e.g.
Abstract base class for all rendered symbols.
Definition: qgssymbol.h:38
This is the base class for vector data providers.
Counts the features in a QgsVectorLayer in task.
Partial snapshot of vector layer's state (only the members necessary for access to features)
Manages joined fields for a vector layer.
Defines left outer join from our vector layer to some other vector layer.
Implementation of map layer temporal properties for vector layers.
Represents a vector layer which manages a vector based data sets.
const QgsActionManager * actions() const
Returns all layer actions defined on this layer.
void committedFeaturesAdded(const QString &layerId, const QgsFeatureList &addedFeatures)
Emitted when features are added to the provider if not in transaction mode.
void labelingFontNotFound(QgsVectorLayer *layer, const QString &fontfamily)
Emitted when the font family defined for labeling layer is not found on system.
void featureBlendModeChanged(QPainter::CompositionMode blendMode)
Signal emitted when setFeatureBlendMode() is called.
void beforeRemovingExpressionField(int idx)
Will be emitted, when an expression field is going to be deleted from this vector layer.
void committedGeometriesChanges(const QString &layerId, const QgsGeometryMap &changedGeometries)
Emitted when geometry changes are saved to the provider if not in transaction mode.
void beforeCommitChanges(bool stopEditing)
Emitted before changes are committed to the data provider.
void mapTipTemplateChanged()
Emitted when the map tip changes.
void attributeAdded(int idx)
Will be emitted, when a new attribute has been added to this vector layer.
void allowCommitChanged()
Emitted whenever the allowCommitChanged() property of this layer changes.
void editCommandStarted(const QString &text)
Signal emitted when a new edit command has been started.
QgsVectorLayer & operator=(QgsVectorLayer const &rhs)=delete
QgsVectorLayer cannot be copied.
void editCommandDestroyed()
Signal emitted, when an edit command is destroyed.
QgsVectorLayer(const QgsVectorLayer &rhs)=delete
QgsVectorLayer cannot be copied.
const QgsDiagramLayerSettings * diagramLayerSettings() const
void featuresDeleted(const QgsFeatureIds &fids)
Emitted when features have been deleted.
void subsetStringChanged()
Emitted when the layer's subset string has changed.
void committedFeaturesRemoved(const QString &layerId, const QgsFeatureIds &deletedFeatureIds)
Emitted when features are deleted from the provider if not in transaction mode.
void symbolFeatureCountMapChanged()
Emitted when the feature count for symbols on this layer has been recalculated.
void writeCustomSymbology(QDomElement &element, QDomDocument &doc, QString &errorMessage) const
Signal emitted whenever the symbology (QML-file) for this layer is being written.
QgsAbstractVectorLayerLabeling * labeling()
Access to labeling configuration.
void attributeDeleted(int idx)
Will be emitted, when an attribute has been deleted from this vector layer.
void beforeEditingStarted()
Emitted before editing on this layer is started.
void committedAttributeValuesChanges(const QString &layerId, const QgsChangedAttributesMap &changedAttributesValues)
Emitted when attribute value changes are saved to the provider if not in transaction mode.
void committedAttributesAdded(const QString &layerId, const QList< QgsField > &addedAttributes)
Emitted when attributes are added to the provider if not in transaction mode.
void committedAttributesDeleted(const QString &layerId, const QgsAttributeList &deletedAttributes)
Emitted when attributes are deleted from the provider if not in transaction mode.
void displayExpressionChanged()
Emitted when the display expression changes.
void editFormConfigChanged()
Will be emitted whenever the edit form configuration of this layer changes.
void afterCommitChanges()
Emitted after changes are committed to the data provider.
const QgsFeatureRenderer * renderer() const
Returns the feature renderer used for rendering the features in the layer in 2D map views.
QgsFeature getFeature(QgsFeatureId fid) const
Queries the layer for the feature with the given id.
void raiseError(const QString &msg)
Signals an error related to this vector layer.
void editCommandEnded()
Signal emitted, when an edit command successfully ended.
void supportsEditingChanged()
Emitted when the read only state or the data provider of this layer is changed.
void readOnlyChanged()
Emitted when the read only state of this layer is changed.
void attributeValueChanged(QgsFeatureId fid, int idx, const QVariant &value)
Emitted whenever an attribute value change is done in the edit buffer.
QgsFeatureIterator getFeatures(const QgsFeatureIds &fids)
Queries the layer for the features with the given ids.
void afterRollBack()
Emitted after changes are rolled back.
const QgsVectorLayerJoinBuffer * joinBuffer() const
Returns a const pointer on join buffer object.
void selectionChanged(const QgsFeatureIds &selected, const QgsFeatureIds &deselected, bool clearAndSelect)
Emitted when selection was changed.
void beforeAddingExpressionField(const QString &fieldName)
Will be emitted, when an expression field is going to be added to this vector layer.
void updatedFields()
Emitted whenever the fields available from this layer have been changed.
void featureAdded(QgsFeatureId fid)
Emitted when a new feature has been added to the layer.
void featureDeleted(QgsFeatureId fid)
Emitted when a feature has been deleted.
void readCustomSymbology(const QDomElement &element, QString &errorMessage)
Signal emitted whenever the symbology (QML-file) for this layer is being read.
void beforeRollBack()
Emitted before changes are rolled back.
const QgsDiagramRenderer * diagramRenderer() const
void geometryChanged(QgsFeatureId fid, const QgsGeometry &geometry)
Emitted whenever a geometry change is done in the edit buffer.
QgsFeatureIterator getFeatures(const QgsRectangle &rectangle)
Queries the layer for the features which intersect the specified rectangle.
const QgsVectorSimplifyMethod & simplifyMethod() const
Returns the simplification settings for fast rendering of features.
void beforeModifiedCheck() const
Emitted when the layer is checked for modifications. Use for last-minute additions.
const QgsVectorLayerEditBuffer * editBuffer() const
Buffer with uncommitted editing operations.
QgsFeatureRenderer * renderer()
Returns the feature renderer used for rendering the features in the layer in 2D map views.
This class contains information how to simplify geometries fetched from a vector layer.
SimplifyHint
Simplification flags for fast rendering of features.
The QgsWeakRelation class represent a QgsRelation with possibly unresolved layers or unmatched fields...
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Definition: qgswkbtypes.h:141
Type
The WKB type describes the number of dimensions a geometry has.
Definition: qgswkbtypes.h:70
#define str(x)
Definition: qgis.cpp:37
QMap< QString, QString > QgsStringMap
Definition: qgis.h:1990
#define SIP_DEPRECATED
Definition: qgis_sip.h:106
#define SIP_SKIP
Definition: qgis_sip.h:126
#define FINAL
Definition: qgis_sip.h:228
#define SIP_PYNAME(name)
Definition: qgis_sip.h:81
#define SIP_PYARGREMOVE
Definition: qgis_sip.h:146
#define SIP_TRANSFER
Definition: qgis_sip.h:36
#define SIP_OUT
Definition: qgis_sip.h:58
#define SIP_FACTORY
Definition: qgis_sip.h:76
QVector< QgsPoint > QgsPointSequence
QMap< int, QVariant > QgsAttributeMap
Definition: qgsattributes.h:38
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
Definition: qgsfeature.h:877
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
Definition: qgsfeature.h:868
QList< QgsFeature > QgsFeatureList
Definition: qgsfeature.h:882
QSet< QgsFeatureId > QgsFeatureIds
Definition: qgsfeatureid.h:37
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
Definition: qgsfeatureid.h:28
QList< int > QgsAttributeList
Definition: qgsfield.h:26
const QgsField & field
Definition: qgsfield.h:463
QList< int > QgsAttributeList
QSet< int > QgsAttributeIds
Context for cascade delete features.
DeleteContext(bool cascade=false, QgsProject *project=nullptr)
Constructor for DeleteContext.
Setting options for loading vector layers.
LayerOptions(bool loadDefaultStyle=true, bool readExtentFromXml=false)
Constructor for LayerOptions.
LayerOptions(const QgsCoordinateTransformContext &transformContext, bool loadDefaultStyle=true, bool readExtentFromXml=false)
Constructor for LayerOptions.
QgsCoordinateReferenceSystem fallbackCrs
Fallback layer coordinate reference system.