Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 : carson.farmer@gmail.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 /* $Id: qgis.h 9774 2008-12-12 05:41:24Z timlinux $ */
18 
19 #ifndef QGSOVERLAYANALYZERH
20 #define QGSOVERLAYANALYZERH
21 
22 #include "qgsvectorlayer.h"
23 #include "qgsfield.h"
24 #include "qgsspatialindex.h"
25 #include "qgsfeature.h"
26 #include "qgsgeometry.h"
27 #include "qgsfield.h"
28 #include "qgsdistancearea.h"
29 
31 class QProgressDialog;
32 
33 
38 class ANALYSIS_EXPORT QgsOverlayAnalyzer
39 {
40  public:
41 
49  bool intersection( QgsVectorLayer* layerA, QgsVectorLayer* layerB, \
50  const QString& shapefileName, bool onlySelectedFeatures = false, \
51  QProgressDialog* p = 0 );
52 
53 #if 0
54 
61  bool combine( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
62  const QString& shapefileName, bool onlySelectedFeatures = false,
63  QProgressDialog* p = 0 );
64 
73  bool clip( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
74  const QString& shapefileName, bool onlySelectedFeatures = false,
75  QProgressDialog* p = 0 );
76 
85  bool difference( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
86  const QString& shapefileName, bool onlySelectedFeatures = false,
87  QProgressDialog* p = 0 );
88 
97  bool symDifference( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
98  const QString& shapefileName, bool onlySelectedFeatures = false,
99  QProgressDialog* p = 0 );
100 #endif
101 
102  private:
103 
104  void combineFieldLists( QgsFieldMap& fieldListA, QgsFieldMap fieldListB );
105  void intersectFeature( QgsFeature& f, QgsVectorFileWriter* vfw, QgsVectorLayer* dp, QgsSpatialIndex* index );
106  void combineAttributeMaps( QgsAttributeMap& attributeMapA, QgsAttributeMap attributeMapB );
107 };
108 #endif //QGSVECTORANALYZER