Quantum GIS API Documentation  1.7.4
src/analysis/vector/qgsoverlayanalyzer.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     qgsoverlayanalyzer.h - QGIS Tools for vector geometry analysis
00003                              -------------------
00004     begin                : 19 March 2009
00005     copyright            : (C) Carson Farmer
00006     email                : [email protected]
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 /* $Id: qgis.h 9774 2008-12-12 05:41:24Z timlinux $ */
00018 
00019 #ifndef QGSOVERLAYANALYZERH
00020 #define QGSOVERLAYANALYZERH
00021 
00022 #include "qgsvectorlayer.h"
00023 #include "qgsfield.h"
00024 #include "qgsspatialindex.h"
00025 #include "qgsfeature.h"
00026 #include "qgsgeometry.h"
00027 #include "qgsfield.h"
00028 #include "qgsdistancearea.h"
00029 
00030 class QgsVectorFileWriter;
00031 class QProgressDialog;
00032 
00033 
00038 class ANALYSIS_EXPORT QgsOverlayAnalyzer
00039 {
00040   public:
00041 
00049     bool intersection( QgsVectorLayer* layerA, QgsVectorLayer* layerB, \
00050                        const QString& shapefileName, bool onlySelectedFeatures = false, \
00051                        QProgressDialog* p = 0 );
00052 
00053 #if 0
00054 
00061     bool combine( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
00062                   const QString& shapefileName, bool onlySelectedFeatures = false,
00063                   QProgressDialog* p = 0 );
00064 
00073     bool clip( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
00074                const QString& shapefileName, bool onlySelectedFeatures = false,
00075                QProgressDialog* p = 0 );
00076 
00085     bool difference( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
00086                      const QString& shapefileName, bool onlySelectedFeatures = false,
00087                      QProgressDialog* p = 0 );
00088 
00097     bool symDifference( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
00098                         const QString& shapefileName, bool onlySelectedFeatures = false,
00099                         QProgressDialog* p = 0 );
00100 #endif
00101 
00102   private:
00103 
00104     void combineFieldLists( QgsFieldMap& fieldListA, QgsFieldMap fieldListB );
00105     void intersectFeature( QgsFeature& f, QgsVectorFileWriter* vfw, QgsVectorLayer* dp, QgsSpatialIndex* index );
00106     void combineAttributeMaps( QgsAttributeMap& attributeMapA, QgsAttributeMap attributeMapB );
00107 };
00108 #endif //QGSVECTORANALYZER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines