From 7aa91b7117d97617ac4d29367b0ee0dae948a2a1 Mon Sep 17 00:00:00 2001 From: cfarmer Date: Sun, 8 Nov 2009 23:12:35 +0000 Subject: [PATCH] oops, forgot the sip file :-p: Python bindings for QgsOverlayAnalyzer (current only supports intersections) git-svn-id: http://svn.osgeo.org/qgis/trunk@12042 c8812cc2-4d05-0410-92ff-de0c093fc19c --- python/analysis/qgsoverlayanalyzer.sip | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 python/analysis/qgsoverlayanalyzer.sip diff --git a/python/analysis/qgsoverlayanalyzer.sip b/python/analysis/qgsoverlayanalyzer.sip new file mode 100644 index 00000000000..391dc30296a --- /dev/null +++ b/python/analysis/qgsoverlayanalyzer.sip @@ -0,0 +1,26 @@ +/** polyline is just a list of points */ +typedef QMap QgsFieldMap; + +/** \ingroup analysis + * The QGis class provides vector geometry analysis functions + */ + +class QgsOverlayAnalyzer +{ +%TypeHeaderCode +#include +%End + + public: + + /**Perform an intersection on two input vector layers and write output to a new shape file + */ + bool intersection( QgsVectorLayer* layerA, QgsVectorLayer* layerB, + const QString& shapefileName, bool onlySelectedFeatures = false, + QProgressDialog* p = 0 ); + + private: + void combineFieldLists( QgsFieldMap fieldListA, QgsFieldMap fieldListB ); + void intersectFeature( QgsFeature& f, QgsVectorFileWriter* vfw, QgsVectorLayer* dp, + QgsSpatialIndex* index ); +};