QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 "qgsfield.h"
23 #include "qgsspatialindex.h"
24 #include "qgsfeature.h"
25 #include "qgsgeometry.h"
26 #include "qgsfield.h"
27 #include "qgsdistancearea.h"
28 
30 class QProgressDialog;
31 
32 
37 class ANALYSIS_EXPORT QgsOverlayAnalyzer
38 {
39  public:
40 
48  bool intersection( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
49  const QString& shapefileName, bool onlySelectedFeatures = false,
50  QProgressDialog* p = 0 );
51 
52  private:
53 
54  void combineFieldLists( QgsFields& fieldListA, const QgsFields& fieldListB );
55  void intersectFeature( QgsFeature& f, QgsVectorFileWriter* vfw, QgsVectorLayer* dp, QgsSpatialIndex* index );
56  void combineAttributeMaps( QgsAttributes& attributesA, const QgsAttributes& attributesB );
57 };
58 
59 #endif //QGSVECTORANALYZER