00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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