QGIS API Documentation
2.2.0-Valmiera
|
The QGis class provides vector overlay analysis functions. More...
#include <qgsoverlayanalyzer.h>
Public Member Functions | |
bool | intersection (QgsVectorLayer *layerA, QgsVectorLayer *layerB, const QString &shapefileName, bool onlySelectedFeatures=false, QProgressDialog *p=0) |
Perform an intersection on two input vector layers and write output to a new shape file. |
Private Member Functions | |
void | combineFieldLists (QgsFields &fieldListA, const QgsFields &fieldListB) |
void | intersectFeature (QgsFeature &f, QgsVectorFileWriter *vfw, QgsVectorLayer *dp, QgsSpatialIndex *index) |
void | combineAttributeMaps (QgsAttributes &attributesA, const QgsAttributes &attributesB) |
The QGis class provides vector overlay analysis functions.
Definition at line 37 of file qgsoverlayanalyzer.h.
|
private |
Definition at line 205 of file qgsoverlayanalyzer.cpp.
Referenced by intersectFeature().
|
private |
Definition at line 184 of file qgsoverlayanalyzer.cpp.
References QgsFields::append(), QgsFields::count(), QgsField::name(), and QgsField::type().
Referenced by intersection().
|
private |
Definition at line 142 of file qgsoverlayanalyzer.cpp.
References QgsVectorFileWriter::addFeature(), QgsFeature::attributes(), QgsGeometry::boundingBox(), combineAttributeMaps(), QgsFeature::geometry(), QgsVectorLayer::getFeatures(), QgsGeometry::intersection(), QgsSpatialIndex::intersects(), QgsGeometry::intersects(), QgsFeatureIterator::nextFeature(), QgsFeature::setAttributes(), and QgsFeature::setGeometry().
Referenced by intersection().
bool QgsOverlayAnalyzer::intersection | ( | QgsVectorLayer * | layerA, |
QgsVectorLayer * | layerB, | ||
const QString & | shapefileName, | ||
bool | onlySelectedFeatures = false , |
||
QProgressDialog * | p = 0 |
||
) |
Perform an intersection on two input vector layers and write output to a new shape file.
layerA | input vector layer |
layerB | input vector layer |
shapefileName | path to the output shp |
onlySelectedFeatures | if true, only selected features are considered, else all the features |
p | progress dialog (or 0 if no progress dialog is to be shown) |
Definition at line 30 of file qgsoverlayanalyzer.cpp.
References combineFieldLists(), QgsMapLayer::crs(), QgsVectorLayer::dataProvider(), QgsVectorDataProvider::encoding(), QgsVectorLayer::featureCount(), QgsVectorDataProvider::geometryType(), QgsVectorLayer::getFeatures(), index, QgsSpatialIndex::insertFeature(), intersectFeature(), QgsFeatureIterator::nextFeature(), QgsVectorLayer::pendingFields(), and QgsVectorLayer::selectedFeaturesIds().