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