Quantum GIS API Documentation  1.8
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 
00018 #ifndef QGSOVERLAYANALYZERH
00019 #define QGSOVERLAYANALYZERH
00020 
00021 #include "qgsvectorlayer.h"
00022 #include "qgsfield.h"
00023 #include "qgsspatialindex.h"
00024 #include "qgsfeature.h"
00025 #include "qgsgeometry.h"
00026 #include "qgsfield.h"
00027 #include "qgsdistancearea.h"
00028 
00029 class QgsVectorFileWriter;
00030 class QProgressDialog;
00031 
00032 
00037 class ANALYSIS_EXPORT QgsOverlayAnalyzer
00038 {
00039   public:
00040 
00048     bool intersection( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
00049                        const QString& shapefileName, bool onlySelectedFeatures = false,
00050                        QProgressDialog* p = 0 );
00051 
00052 #if 0
00053 
00060     bool combine( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
00061                   const QString& shapefileName, bool onlySelectedFeatures = false,
00062                   QProgressDialog* p = 0 );
00063 
00072     bool clip( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
00073                const QString& shapefileName, bool onlySelectedFeatures = false,
00074                QProgressDialog* p = 0 );
00075 
00084     bool difference( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
00085                      const QString& shapefileName, bool onlySelectedFeatures = false,
00086                      QProgressDialog* p = 0 );
00087 
00096     bool symDifference( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
00097                         const QString& shapefileName, bool onlySelectedFeatures = false,
00098                         QProgressDialog* p = 0 );
00099 #endif
00100 
00101   private:
00102 
00103     void combineFieldLists( QgsFieldMap& fieldListA, QgsFieldMap fieldListB );
00104     void intersectFeature( QgsFeature& f, QgsVectorFileWriter* vfw, QgsVectorLayer* dp, QgsSpatialIndex* index );
00105     void combineAttributeMaps( QgsAttributeMap& attributeMapA, QgsAttributeMap attributeMapB );
00106 };
00107 #endif //QGSVECTORANALYZER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines