QGIS API Documentation  2.99.0-Master (90ae728)
qgsoverlayanalyzer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsoverlayanalyzer.h - QGIS Tools for vector geometry analysis
3  -------------------
4  begin : 19 March 2009
5  copyright : (C) Carson Farmer
6  email : [email protected]
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 QGSOVERLAYANALYZERH
19 #define QGSOVERLAYANALYZERH
20 
21 #include "qgsvectorlayer.h"
22 #include "qgis_analysis.h"
23 
25 class QProgressDialog;
26 class QgsSpatialIndex;
27 
32 class ANALYSIS_EXPORT QgsOverlayAnalyzer
33 {
34  public:
35 
43  bool intersection( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
44  const QString& shapefileName, bool onlySelectedFeatures = false,
45  QProgressDialog* p = nullptr );
46 
47  private:
48 
49  void combineFieldLists( QgsFields& fieldListA, const QgsFields& fieldListB );
50  void intersectFeature( QgsFeature& f, QgsVectorFileWriter* vfw, QgsVectorLayer* dp, QgsSpatialIndex* index );
51  void combineAttributeMaps( QgsAttributes& attributesA, const QgsAttributes& attributesB );
52 };
53 
54 #endif //QGSVECTORANALYZER
static unsigned index
Container of fields for a vector layer.
Definition: qgsfields.h:39
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:136
The QGis class provides vector overlay analysis functions.
A vector of attributes.
Definition: qgsfeature.h:56
Represents a vector layer which manages a vector based data sets.